Home > Article > Backend Development > Centos6.5 has pdo_mysql installed or there is no pdo_mysql
I successfully installed pdo_mysql and restarted php-fpm, but there is no pdo_mysql. What is the error? Baidu contacted me and said that the php.ini path is wrong. I put php.ini under /php/etc. Where to put it? How to configure?
I successfully installed pdo_mysql and restarted php-fpm, but there is no pdo_mysql. What is the error? Baidu contacted me and said that the php.ini path is wrong. I put php.ini under /php/etc. Where to put it? How to configure?
Check the directory in the Configuration File Path to see if there is php.ini.
If the php.ini file does not take effect, you can use the -c parameter when starting php-fpm
Recompile and give it a try
Add the parameter --with-pdo-mysql=$MYSQL_BASE
Thanks for the invitation
Yes, your php.ini
path is wrong, because your PHP
did not actively specify the path of the configuration file when compiling. Looking at your screenshot, now php.ini
reads The path taken is /usr/local/php/lib
, and you placed the file under /usr/local/php/etc
.
Solution:
Move php.ini
to /usr/local/php/lib/php.ini
, then restart
Recompile PHP
, add compilation parameters --with-config-file-path=/usr/local/php/etc
, and add --with-pdo-mysql=mysqlnd
extension="pdo_mysql.so" Follow the absolute path of the dynamic library and restart php-fpm