679   MySQL PHP

错误提示:


Call to undefined function mysqli_init()

这是因为PHP扩展缺少mysqli,那就安装吧。
之前已经安装过PHP的扩展,参考方法:http://www.luckybird.me/pdoexception-could-not-find-driver.html

这里简单说下:
1,生产mysqli.so

# cd /home/weblogic/php-5.6.8/ext/mysqli
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/bin/mysql_config
# make 
# make install
# cp modules/mysqli.so /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226

2,编辑php.ini,添加内容

extension=mysqli.so

3,重启服务,包括php-fpm和nginx

[root@v0A-123-177-206 PDO_MYSQL-1.0.2]# service php-fpm restart
Restarting php-fpm daemon: php-fpm.
[root@v0A-123-177-206 PDO_MYSQL-1.0.2]# service nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

4,查看安装结果

[root@v0A-123-177-206 PDO_MYSQL-1.0.2]# php -m




Trackbacks/Pingbacks

  1.  CodeIgniter通过phpredis使用Redis | LuckyBird

Leave a Reply

Your email address will not be published. Required fields are marked *