Home > Backend Development > PHP Tutorial > Call to undefined function mysql_connect(),该如何处理

Call to undefined function mysql_connect(),该如何处理

WBOY
Release: 2016-06-13 10:02:37
Original
949 people have browsed it

Call to undefined function mysql_connect()
./configure --with-mysql=/usr/lib/mysql --with-zlib-dir=/usr/local/zlib 
make
make install
这是我安装php的命令,没有提示任何错误。
我用php在服务器端写了个函数,里面访问mysql,单独运行该脚本,正常执行,但是在客户端用soap调用该函数就出现下面的错误:
Call to undefined function mysql_connect()

大家帮帮忙啊,整了一下午了……

------解决方案--------------------
你除了安装mysql, 还得安装mysql的php版开发包, 在服务器下有个扩展叫mysql.so或mysqld.so之类的

你可以在终端试下

$ echo ' phpinfo() ?>' > test.php

然后用你的方式去执行test.php文件, 看下里面有没安装到mysql扩展。
------解决方案--------------------
mysql扩展没打开或者没安装

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