日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

php怎么增加mysql扩展

發(fā)布時間:2023/12/31 综合教程 30 生活家
生活随笔 收集整理的這篇文章主要介紹了 php怎么增加mysql扩展 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

php增加mysql擴展的方法:1、通過yum安裝libxml,openssl,mysql,mysql-devel等;2、修改“--with-mysql=/usr”即可。

本文操作環(huán)境:CentOS release 5.8系統(tǒng),PHP5.6版,Dell G3電腦。

php怎么增加mysql擴展?

php 添加mysql擴展:

os:CentOS release 5.8 (Final)

php 版本:http://cn2.php.net/distributions/php-5.6.18.tar.gz

先yum安裝libxml ,openssl ,mysql,mysql-devel 等。

網(wǎng)上搜索了下congfigure命令如下

./configure --prefix=/usr/local/php5 --with-config-file-path=/usr --with-mysql=/usr/include/mysql --with-mysqli=/usr/bin/mysql_config --with-libxml-dir=/usr/local/libxml2 --with-openssl

報錯:

Cannot find MySQL header files under /usr/include/mysql

網(wǎng)上各種說法都嘗試了,都沒有用,后來我直接看configure文件為啥老這樣報,

于是先grep 'error: Cannot find MySQL header files under' configure -n

發(fā)現(xiàn)出現(xiàn)這條日志的地方在這里:

./configure:fiif test "$PHP_MYSQL" = "yes" || test "$PHP_MYSQL" = "mysqlnd"; then PHP_MYSQLND_ENABLED=yeselif test "$PHP_MYSQL" != "no"; then MYSQL_DIR= MYSQL_INC_DIR= if test -r $PHP_MYSQL/include/mysql/mysql.h; then MYSQL_DIR=$PHP_MYSQL MYSQL_INC_DIR=$PHP_MYSQL/include/mysql break elif test -r $PHP_MYSQL/include/mysql.h; then MYSQL_DIR=$PHP_MYSQL MYSQL_INC_DIR=$PHP_MYSQL/include break fi if test -z "$MYSQL_DIR"; then { { $as_echo "$as_me:$LINENO: error: test Cannot find MySQL header files under $PHP_MYSQL.Note that the MySQL client library is not bundled anymore!" >&5$as_echo "$as_me: error: hgyang Cannot find MySQL header files under $PHP_MYSQL $MYSQL_DIR.Note that the MySQL client library is not bundled anymore!" >&2;} { (exit 1); exit 1; }; } fi

你妹啊!!!

原來 --with-mysql=/usr就可以了,include/mysql已經(jīng)被包含了,哥瞬間淚奔了,好大一個坑。

推薦學(xué)習(xí):《PHP視頻教程》

總結(jié)

以上是生活随笔為你收集整理的php怎么增加mysql扩展的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。