1

我使用 yum(CentOS 5 64 位)通过 Remi repo 安装了 PHP 5.4.6

我也运行了这个“yum --enablerepo=remi --disablerepo=base,updates install php54-mysql”,它说它有效,但是当我尝试启动 PHP-FPM 时,它说这个

>Starting php-fpm: [26-Sep-2012 21:28:09] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.15: cannot open shared object file: No such file or directory in Unknown on line 0 
>[26-Sep-2012 21:28:09] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.15: cannot open shared object file: No such file or directory in Unknown on line 0 
>[26-Sep-2012 21:28:09] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.15: cannot open shared object file: No such file or directory in Unknown on line 0 

我在服务器上寻找“libmysqlclient.so.15”,但我发现的只是“libmysqlclient.so.18”

如果它有助于我使用 nginx 和 mysql 5.5

4

1 回答 1

0

您可以这样做,找到您的 php.ini 文件并添加此变量(如果存在并更改它。):

extension_dir = "/path/to/some/folder"

然后将所有 .so 文件放在/path/to/some/folder路径中。

然后重启apache,测试一下

你可以看看这个链接,我也很难与 php+mysql 集成。https://askubuntu.com/questions/174509/connection-failed-to-open-the-db-connection-could-not-find-driver

于 2012-09-27T04:03:34.637 回答