Omeka S fails to load after updating MySQL from 8.0 to 8.3

Hello everyone,

I recently updated MySQL from 8.0 to 8.3 on my WSL running Ubuntu 22.4. Omeka S was working with the older version, but after the upgrade I receive the following error message:

Some installation requirements were not satisfied.

  • Omeka requires the PHP extension pdo_mysql, but it is not loaded.
  • An exception occurred in driver: could not find driver
    Cann anyone help me with what the problem is and how to fix it?

Thank you!

For a bit of context, I tried updating the pdo with

sudo apt-get install php-mysql

and then restart Apache and MySQL, but the problem is still there.

I searched online for a solution, and it seems it has something to do with updating php.ini and/or .htaccess. Could anyone confirm if this is the case and if so how to fix it?

Thank you!

What do you get if you run php -m? It should be a list of installed modules. Does it have pdo_mysql, or anything similar?

If you’re getting the error you show above, it’s PHP reporting that the necessary driver for MySQL used by Omeka S isn’t there. Typically the command you report running is sufficient for installing it on an Ubuntu system, though.

I ran php -m and the pdo_mysql did show up there. Here is the list that showed up when I ran the command:

[PHP Modules]
calendar
Core
ctype
date
dom
exif
FFI
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
random
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

So, you have the module listed there, then I’d imagine the problem is related to just the PHP that’s running in the web… maybe it didn’t get restarted, or you have more than one version of PHP installed. You could, I suppose, restart the computer entirely to be certain that PHP is restarted.

I tried sudo reboot as root and got the following message:

System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
Failed to talk to init daemon.

I’m using WSL. Do you know what this error mean?

Thank you!

I actually do have more than one version of PHP installed, but the default version is linked to PHP 8.3.

I meant just restart the whole computer to sidestep any issues with restarting things inside WSL.

Though since you’ve said you do have multiple versions installed, I’d also be extra sure that this is the version you have configured to use with your web server. You might check the /etc/apache2/conf-enabled folder, which in an Ubuntu system will normally reveal what PHP you have configured for the server.

If by restarting you meant restarting the physical machine, I have restarted multiple times since the problem began, and it is still there. I tried looking in the folder you mentioned, but I had no way of telling the php version there. This is the content of the folder after I ran ls:

lrwxrwxrwx 1 root root 30 Nov 4 2021 charset.conf → …/conf-available/charset.conf
lrwxrwxrwx 1 root root 29 Nov 4 2021 gitweb.conf → …/conf-available/gitweb.conf
lrwxrwxrwx 1 root root 44 Nov 4 2021 localized-error-pages.conf → …/conf-available/localized-error-pages.conf
lrwxrwxrwx 1 root root 46 Nov 4 2021 other-vhosts-access-log.conf → …/conf-available/other-vhosts-access-log.conf
lrwxrwxrwx 1 root root 31 Nov 4 2021 security.conf → …/conf-available/security.conf
lrwxrwxrwx 1 root root 36 Nov 4 2021 serve-cgi-bin.conf → …/conf-available/serve-cgi-bin.conf

I tried to create a symbolic link to php.default a different PHP version in usr/bin, but the PHP version remains to be 8.3 when I ran php -v after that. Could this be where the problem is? The command I used was:
ln -sf php8.1 php.default

I have been able to solve the problem. I uninstalled all versions of PHP and clean installed PHP 8.3, followed by the pdo_mysql and xml packages. I was able to access Omeka S after that.

Thank you so much for your great suggestions, John. I really appreciate your help!