MysqlI vs. PDO_mysql?

Hello,
trying to move an omeka classic install on a new server, I have an issue with the connection to my database. Digging into the code I have found that it is because my hosting requires some SSL settings to be set to allow the PHP server to access the database. The issue is that I have not been able to fix it by changing settings in omeka classic, but only by updating the code. I have found that in application/libraries/Omeka/Application/Resource/Db.php if I change the line :

$dbh = Zend_Db::factory('Mysqli', $connectionParams);

to :

$connectionParams["driver_options"][PDO::MYSQL_ATTR_SSL_CA] = "";
$connectionParams["driver_options"][PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false;
$dbh = Zend_Db::factory('PDO_Mysql', $connectionParams);

At first sight it seems to work fine but I wonder if there is a reason to have Mysqli fixed in the code rather than an option to chose between different adapters? Should this create some issues at some screens I have not tried yet?

Thanks,
S.

Omeka Classic is intended to use mysqli only.

PDO will probably work more or less, but things like exceptions and stuff like that could differ. I can’t really say with certainly whether or not there will be some problem with it. Probably any issues would be with things like error reporting rather than normal operation.

Thanks @jflatnes . As this website is more or less readonly, I assume there won’t be many edge cases so most of it should work, I will stay with PDO then.

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.