PHP is Missing mysql pdo Driver -


i'm trying run symfony 3 app php 7 installed source , i'm getting missing pdo driver exception. according http://pecl.php.net/package/pdo_mysql pdo_mysql extension part of php core.

q1.a) if have pdo_mysql extension (which must, since core) mean have mysql pdo driver?

q2.b) there further runtime configuration have make sure driver gets used?

i've tried adding

extension=php_pdo.so

extension=php_pdo_mysql.so

to loaded php.ini file.

q2.a) these correct extension names? how find out?
q2.b)do have provide extension references core php elements?

finally:

q3. how can check whether php install included mysql pdo driver , how make sure being loaded @ runtime?

thanks input.

edit 1: i'm running on linux mint.
edit 2: here couple more details on i'm seeing on end:

"on starting built in php server following message: php warning: php startup: unable load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo.so: cannot open shared object file: no such file or directory in unknown on line 0 php warning: php startup: unable load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20151012/php_pdo_mysql.so: cannot open shared object file: no such file or directory in unknown on line 0"

this message suggests me either extension references incorrect or extension not exist. used "dpkg -l php-mysql" , found package installed in "/usr/share/doc/php-mysql" however, when check in php-mysql directory, see changelog , copyright file (with hiddens shown). true install location of package and, if so, should there more in directory?

.so implies on linux - did install php package. need install pdo/mysql package - php libraries may "core", not in main package (confusing, means it's not pear delivered, really).

sudo apt-get install php5-mysql 

or, if you're running php7:

sudo apt-get install php-mysql 

this should restart apache automatically, sure do:

sudo service apache2 restart 

the package installer php-mysql should have put .so libraries in /usr/lib/php/yyyymmdd/ - if had installed php package, looking here.

however, since installed source, seems php looking elsewhere libraries. can create symlinks /usr/local/lib/php/extensions/no-debug-non-zts-20151012/ package installed libraries.


Comments