欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php for Linux之mysqli扩展模块安装与配置

程序员文章站 2022-06-16 21:55:43
...
cd /root/php-5.6.8/ext/mysqli

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config

make && make install

编辑 /usr/local/php/lib/php.ini ,增加如下内容:

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-zts-20131226/"

extension = "mysqli.so"

Apache:

/etc/init.d/httpd stop

/etc/init.d/httpd start

Nginx:

nginx -s stop

php-fpm开启:

/usr/local/php/sbin/php-fpm

php-fpm 关闭:

kill -INT `cat /usr/local/php/var/run/php-fpm.pid`

php-fpm 重启:

kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`