openlitespeed安装php56-mysql出现版本不匹配的问题
场景:在CentOS7里安装openlitespeed,配置php5.6。测试使用mysql站点的网站程序时,页头会显示:Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50560 Library:50637
过程:
1.在phpinfo信息页会显示 mysql Client API version - 5.6.37
2.yum remove lsphp56-mysql # 删除 lsphp56-mysql
3.yum install lsphp56-mysqlnd # 安装 lsphp56-mysqlnd
4./usr/local/lsws/bin/lswsctrl restart # 重启 openlitespeed
5.在phpinfo信息页显示的是 mysql Client API version - mysqlnd 5.0.11-dev - 20120503
5.再次测试网站程序,不会提示mysql版本不匹配的警告信息了
参考: