Question

I moved the installation to a different server. I updated the configfile in the var/ directory and the banners are served, but the admin interface is not working.

i get the error:

A fatal error occurred OpenX can't connect to the database. Because of this it isn't possible to use the administrator interface

i cleaned the cache directory in var but then i get PHP Fatal error: Call to undefined method MDB2_Error::quoteIdentifier() in /[path]/opx/lib/OA/Upgrade/VersionController.php on line 50

I dont know which version this is, but it looks like its at least 2 years old.

Is there any special cache in place im not aware of?

Any help on this would be much appreciated.

Was it helpful?

Solution

Mental note,.. if you have the db on a different server then openx it does not matter if you set the host to the ip of the db server and the port.. as long if you not set protocol=protocol !!!

this is by far the most stupidest thing i have ever seen, there is no need for a protocol config, as php always uses the socket if you set "localhost".

OTHER TIPS

It's not easy to tell exactly what's wrong here, but one can make a good guess:

As we can see from the error message, there is an object in your code that doesn't implement the method quoteIdentifier().

There are mainly two possible reasons for this: Either we're calling an older or newer version of the same Class instance which doesn't implement the method. Maybe because it's deprecated or who knows. Or the object simply isn't of the expected type.

Lo and behold, if we look for an MDB2 related class that DOES implement this method, it's the class MDB2. Not MDB2_Error! So now we know the reason for the error, it's time to speculate about the root cause.

Connecting to a database with MDB2 works roughly like this:

$mdb2 =& MDB2::connect('pgsql://usr:pw@localhost/dbnam');
if (PEAR::isError($mdb2)) {
    die($mdb2->getMessage());
}

There it is. We can see that $mdb2 can actually be of type MDB2_Error, in case connecting goes wrong for some reason. So that is the cause: Your code cannot connect to the DB for some reason. So the next obvious step should be checking if your db user has the correct rights and is using the correct password. I am 100% sure your admin backend doesn't use the right credentials.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top