I have the same problem, I change the system, apache is ok, php is ok, driver for php ok but the error continued…
Omeka S encountered an error
Zend\ServiceManager\Exception\ServiceNotCreatedException
An exception was raised while creating “Omeka\ModuleManager”; no instance returned
Details:
exception ‘PDOException’ with message ‘could not find driver’ in /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Stack trace:
Your problem looks to be that you have a version of PHP that’s not recent enough for Omeka S. It requires PHP 5.6 or newer. We may be able to do something to make this error more friendly, but it’s telling you there’s a syntax error, but that line uses a syntax that was added in PHP 5.6. The most recent LTS version of Ubuntu, 16.04, has a recent enough PHP version.
On the other hand, your problem seems to be that you don’t have the PDO mysql driver installed on your system. You have PDO itself, but not pdo_mysql. Depending on your distribution it should be easy to install that extension, usually just by installing whatever package provides mysql support for PHP.
@gusu Your error is a little different than Julie’s. I tried to clarify that. You’d get more information about yours by running php -m rather than php -v
We already know you have the right version of PHP, you just don’t have the right extensions, and php -m lists those. The one you’re missing is pdo_mysql.
root@tehuelche:/etc/php/5.6/cli/conf.d# more 10-pdo.ini
; configuration for php common module
; priority=10 extension=pdo.so
root@tehuelche:/etc/php/5.6/cli/conf.d#
root@tehuelche:/etc/php/5.6/cli/conf.d# apt-get install php-mysql
Reading package lists… Done
Building dependency tree
Reading state information… Done
php-mysql is already the newest version (1:7.0+45+deb.sury.org~trusty+1).
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
root@tehuelche:/etc/php/5.6/cli/conf.d#
The normal version of PHP in 16.04 is 7. That’s what’s being reported when you ran the command to instal php-mysql, it said version 7.0 is already installed.
But, you’re showing that you’re using PHP 5.6 instead. It looks like you might have added a PPA or other repository to specifically install PHP 5.6 instead of 7?
I think you either need to switch over to actually using PHP 7, where you do have the MySQL driver installed, or you need to install the MySQL driver for your 5.6 install if you want to keep using that one. I think you’ve got a somewhat nonstandard setup, so I’m not sure how to tell you to go about doing that in specific detail.
root@tehuelche:/etc/php/5.6/cli/conf.d# dpkg -l php*mysql
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
++±==============-============-============-=================================
ii php-mysql 1:7.0+45+deb all MySQL module for PHP [default]
un php-pdo-mysql (no description available)
rc php5-mysql 5.5.9+dfsg-1 amd64 MySQL module for php5
ii php7.0-mysql 7.0.13-1+deb amd64 MySQL module for PHP
un php7.0-pdo-mys (no description available)
The same as with Omeka Classic, make sure you have the .htaccess file sitting in your Omeka S directory, make sure that Apache is configured to respect .htaccess files with AllowOverride All in Apache’s configuration file, and make sure you have mod_rewrite enabled.