linux 下 php的mysql扩展编译成功 显示mysql support yes 下面一切顺利 但是页面上却call undefined functio,该如何解决

WBOY
Release: 2016-06-13 10:12:13
Original
792 people have browsed it

linux 下 php的mysql扩展编译成功 显示mysql support yes 下面一切顺利 但是页面上却call undefined functio
linux 下 php的mysql扩展编译成功 显示mysql support yes 下面一切顺利 但是页面上却call undefined function mysql_connect 
phpinfo()中依然没有 mysql 怎么回事啊?大家们

------解决方案--------------------
php.ini配置文件中开启 mysql相关扩展了没?
------解决方案--------------------
不知道你怎么编译的
--with-mysql=/opt/mysql/server-5.5/ 
注意编译php的时候加上mysql路径
如果是另外编译的 需要在php.ini增加上 mysql.so 不过我只对mysqli这么干过.
------解决方案--------------------

探讨

引用:

不知道你怎么编译的
--with-mysql=/opt/mysql/server-5.5/
注意编译php的时候加上mysql路径
如果是另外编译的 需要在php.ini增加上 mysql.so 不过我只对mysqli这么干过.


编译成功后,还有去改php.ini吗?
cp php.ini-development /usr/l……

------解决方案--------------------
php.ini:
extension_dir = ".:/usr/nc-home/php5/include/php/ext:/usr/nc-home/php5/lib/php:/usr/local/lib/"
extension = /usr/nc-home/php5/lib/php/extensions/no-debug-non-zts-20090626/hello.so
------解决方案--------------------
extensions/no-debug-non-zts-20090626/hello.so 是你编译后的路径 一般成功编译后会有路径提示 给复制下来最后hello.so 要修改成mysql.so

You will need re2c 0.13.4 or later

那你就去下个新的
wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download
tar -zxvf re2c-0.13.5.tar.gz
cd re2c-0.13.5
./configure && make && make install

Try adding --with-zlib-dir=.

这里 修改成 --with-zlib-dir=/usr/lib
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!