Error: Call to a member function getActive() on null: Could not connect to MySQL server.