问题:部署discus时提示
mysql_connect() 不支持请检查 mysql 模块是否正确加载
判断:
- 运行phpinfo();输出没有mysql
- php -m|grep mysql 没有找到mysql
[root@nginx3 ~]# /usr/local/php/bin/php -m|grep mysql
解决:
- 进入/usr/local/src/php-5.2.13/ext/mysql/目录
- 运行/usr/local/php/bin/phpize
- 运行./configure --with-mysql=/usr/local/mysql
- make
- make install
- 进入/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613 目录会看到mysql.so模块
- 编辑/usr/local/php/lib/php.ini加入如下2条语句:
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"
extension = mysql.so
- /usr/local/php/bin/php -v 检查php配置文件是否正确
- 重启nigix
kill -HUP `cat /opt/ngnix/logs/nginx.pid`
- 重启php-fpm
/usr/local/php/sbin/php-fpm restart
问题解决