请问如何增加mysqli扩展呢

请问如何增加mysqli扩展呢,看了很多教程都太高深了,菜鸟求简单解决办法

欢迎转载,但请保留此信息
[我的Linux,让Linux更易用] CentOS精简版,集成lamp,lnmp版,wdcp,wdcdn,wddns,一键安装包,集群负载均衡LVS,智能DNS/CDN,性能优化
本文连接:http://www.wdlinux.cn/old/node/397

非常感谢

 添加成功了,真心感谢wdlinux大大的教程

增加mysqli擴展的詳細教程

 Dear wdlinux 大
同上發文者的求助,希望尋求完整的wdcp lamp 擴展mysqli 的安裝方法,小弟在網路上還有在QQ群裡搜尋加詢問多次,但還是無法正常加上擴展mysqli的方法,希望wdlinux大大,有空發個教程,感謝辛勞。

假如你是用lanmp.tar.gz安装的cd

假如你是用lanmp.tar.gz安装的
cd lanmp/php-5.2.17
可以通过phpinfo来查看原本php的编译参数,如下
./configure --prefix=/www/wdlinux/php-5.2.17 --with-config-file-path=/www/wdlinux/etc --with-fpm-conf=/www/wdlinux/etc/php-fpm.conf --with-mysql=/www/wdlinux/mysql --with-iconv-dir=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --with-apxs2=/www/wdlinux/apache/bin/apxs

在最后增加 --with-mysqli=/www/wdlinux/mysql/bin/mysql_config

全部如下
./configure --prefix=/www/wdlinux/php-5.2.17 --with-config-file-path=/www/wdlinux/etc --with-fpm-conf=/www/wdlinux/etc/php-fpm.conf --with-mysql=/www/wdlinux/mysql --with-iconv-dir=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --with-apxs2=/www/wdlinux/apache/bin/apxs --with-mysqli=/www/wdlinux/mysql/bin/mysql_config
然后
make;make install

编译完,重起下httpd就可以了,如
service httpd restart

完成
以上是对apache的,如果是nginx,方法一样,只是把apache相关的替换为nginx即可

也单独下载php-5.2.17.tar.gz文件进行编译

mysqli 擴展添加成功

 依照wdlinux大的教學,已經可以使用mysqli參數了,太棒了,萬分感激wdlinux大大的詳細教學。

這邊也希望在下一版所有系列都能內涵mysqli的支援︿︿再次感謝。

非常感谢大大的教程,我是通过wdcp一键装的

我是通过wdcp一键装的,没有找到lanmp.tar.gz,所以我单独下了个php-5.2.17.tar.gz
步骤是下载php-5.2.17.tar.gz,然后解压到了root的php-5.2.17文件夹
然后执行如下代码
[root@localhost ~]# cd php-5.2.17
[root@localhost php-5.2.17]# ./configure --prefix=/www/wdlinux/php-5.2.17 --with-config-file-path=/www/wdlinux/etc --with-fpm-conf=/www/wdlinux/etc/php-fpm.conf --with-mysql=/www/wdlinux/mysql --with-iconv-dir=/usr --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt=/usr --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-ftp --with-apxs2=/www/wdlinux/apache/bin/apxs --with-mysqli=/www/wdlinux/mysql

在编译后出现这样的信息
以上略
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
mysql_config not found
configure: error: Please reinstall the mysql distribution

最后执行
[root@localhost php-5.2.17]# make;make install
make: *** 没有指明目标并且找不到 makefile。 停止。
make: *** 没有规则可以创建目标“install”。 停止。
[root@localhost php-5.2.17]# service httpd restart
停止 httpd:                                               [确定]
启动 httpd:                                               [确定]

在查看phpinfo后,感觉应该还是失败了,应该是mysql的路径问题,请问这样该怎么解决呢,非常感谢

错了,应该是加

错了,应该是加 --with-mysqli=/www/wdlinux/mysql/bin/mysql_config

重新编译PHP,加上支持mysqli的参数

重新编译PHP,加上支持mysqli的参数

请教下详细的编译流程呢

自己试了半天也不会,请教下详细的编译流程

在PHP的./configure 的后面加上

在PHP的./configure 的后面加上 --with-mysqli=/www/wdlinux/mysql

研究许久还是没弄懂

PHP的./configure 是什么意思呢?看了很多教程也没弄懂,
文件里面也找不到mysqli的文件夹
一直提示没有那个文件或目录,请老大详细解答下吧,谢谢了
或加我qq23789788好不,我加那个群从来没有反应,郁闷哟