我在linux上安装了mysql-5.1.51-linux-x86_64-glibc23.tar.gzPHP Version 5.3.3的phpinfo()如下:
Configure Command './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql-dir=/usr/local/mysql' '--with-libxml-dir=/usr/local/libxml' '--with-gd=/usr/local/gd' '--with-jpeg-dir=/usr/local/jpeg' '--with-png=/usr/local/lib' '--with-zlib-dir=/usr/local/zlib' '--with-freetype-dir=/usr/local/freetype' '--with-curl=/usr/local/curl/' '--enable-ftp' '--enable-soap' '--with-xsl=/usr/local/libxslt' '--enable-xslt' '--enable-sockets' '--enable-mbstring' '--enable-exif' '--with-imagick=/usr/local/ImageMagickmysql启动正常,
[root@cvs bin]# mysql --version
mysql Ver 14.14 Distrib 5.1.51, for unknown-linux-gnu (x86_64) using readline 5.1
可是用php页面测试mysql数据库连接时,报Fatal error: Call to undefined function mysql_connect()
请问下该如何解决?
Configure Command './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-mysql-dir=/usr/local/mysql' '--with-libxml-dir=/usr/local/libxml' '--with-gd=/usr/local/gd' '--with-jpeg-dir=/usr/local/jpeg' '--with-png=/usr/local/lib' '--with-zlib-dir=/usr/local/zlib' '--with-freetype-dir=/usr/local/freetype' '--with-curl=/usr/local/curl/' '--enable-ftp' '--enable-soap' '--with-xsl=/usr/local/libxslt' '--enable-xslt' '--enable-sockets' '--enable-mbstring' '--enable-exif' '--with-imagick=/usr/local/ImageMagickmysql启动正常,
[root@cvs bin]# mysql --version
mysql Ver 14.14 Distrib 5.1.51, for unknown-linux-gnu (x86_64) using readline 5.1
可是用php页面测试mysql数据库连接时,报Fatal error: Call to undefined function mysql_connect()
请问下该如何解决?
我安装这个后,也没有用
如此装了也不行
能不能说的具体点,在apache里如何让它加载mysql.so?
--with-mysql-dir=/usr/local/mysql可是实际上你的mysql是安装在/usr/local/mysql的吗?!
源码编译安装mysql+php+apache http://blog.csdn.net/steptodream/archive/2010/09/09/5874314.aspx