PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0 [25-May-2023 15:23:47] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mysqli.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0 [25-May-2023 15:23:47] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_mysql.so' - libmysqlclient.so.16: cannot open shared object file: No such file or directory in Unknown on line 0
时间: 2024-02-01 09:04:14 浏览: 194
PHP Warning: PHP Startup: Unable to load dynamic library \ D:/php5/ext/php_mysqli.dll\
这个错误信息表明 PHP 在启动时无法加载 MySQL 扩展,因为缺少 libmysqlclient.so.16 库文件。你需要安装这个库文件,或者检查它是否已经安装并且路径是否正确配置。可以尝试使用以下命令安装:
```
sudo yum install mysql-devel
```
如果已经安装了这个库文件,可以尝试在 php.ini 文件中添加以下内容:
```
extension=/usr/lib64/php/modules/mysql.so
extension=/usr/lib64/php/modules/mysqli.so
extension=/usr/lib64/php/modules/pdo_mysql.so
```
然后重启 PHP 服务。
阅读全文