You are not logged in.
Pages: 1
Hello,
I recently installed Arch on a VPS and installed Nginx, MariaDB and PHP 7.1 also. I did some preliminary configurations and also deployed a Laravel application to it.
When I wanted to run the database migrations for my application I stumbled across the error:
[PDOException] could not find driver
The driver in question is the mysql driver.
I checked the list of installed modules with php -m and it shows that PDO is loaded but no PDO_mysql.
I checked the modules directory under /usr/lib/php/modules and it has pdo_mysql.so in the directory. In php.ini I have the extension_dir set to /usr/lib/php/modules.
I then checked the info output using php -i and I see that PDO is enabled but no drivers are loaded.
> php -i | grep PDO
PDO
PDO support => enabled
PDO drivers =>
I then checked what configuration file is loaded and it shows that /etc/php/php.ini is loaded which is the correct file.
Then out of curiosity I tried installing php-pgsql package to get the PDO_pgsql extension to see if that would get installed.
I did the necessary restarts to php-fpm and then checked the output of php -m. Again it still has only PDO but no PDO_pgsql. I checked the /usr/lib/php/modules directory and I can see pgsql.so and pdo_pgsql.so. I checked output of php -i and again it shows PDO support is enabled but no drivers are loaded.
I feel like I am missing something but can't really wrap my head around what it could be.
Any help is appreciated.
Offline
As it appears, drivers need to be added manually in the php.ini file. Have you done that?
Offline
Offline
@logs Completely forgot about the git repo. Good thought to have a look it, will keep that in mind!
Last edited by robg (2017-11-08 08:59:25)
Offline
Pages: 1