致命错误:调用未定义的函数mysql_connect() [英] Fatal error: Call to undefined function mysql_connect()

查看:99
本文介绍了致命错误:调用未定义的函数mysql_connect()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我解决问题;我在我的膝上运行Apache web服务器,加上一个mysql服务器和php。当前安装的php版本是5.2.5。

当我写一些php连接到我的mysql数据库服务器而不是连接我得到:

致命错误:致电到第16行的C:\Program Files \Apache Group \Apache2 \htdocs\chephrenrepairs \ dataatatryproc ess.php中的未定义函数mysql_connect()。


问题1是这个:

这是否发生是因为我安装的php版本不支持与它捆绑的mysql?


问题2:是否有一些版本完全不支持mysql的php 5,因为它被php写入者删除了,如果是这样,哪个版本的php 5确实有内置的mysql支持才能正常工作?


我已经看过这个论坛,发现有人说在php 5中删除了mysql支持,但是它没有说它是从哪个版本的PHP 5中删除了,也没有暗示如何做到让php通信twith本地的神秘ql服务器??


如果问题1和2已经在这个论坛的另一个帖子中得到回答那么请在哪里???

Please can some one help with my problem; I am running Apache web server on my lap top, plus a mysql server and php. The version of php currently installed is 5.2.5.
when i write some php to connect to my mysql database server instead of it connecting i get :
Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\chephrenrepairs\dataentryproc ess.php on line 16.

question 1 is this:
Is this happening because the version of php i have installed has no support for mysql bundled with it?

Question 2: Are there some versions of php 5 that have no support for mysql at all because it was removed by the php writters and if so which versions of php 5 do have mysql support built in to them that works properly?

I have looked on this forum and found that someone said that mysql support was removed in php 5, but it sdoes not say which version of php 5 it was removed from, neither does it hint as what to do to get php communicating twith the local mysql server??

if questions 1 and 2 have been answered in anther thread on this forum then please where???

推荐答案

简答:

1.可能


2.这取决于PHP构建的分销商。我认为PHP 5源代码有一般的支持,可能是默认启用的。


长答案:

我不知道在PHP 5上已取消MySQL支持。但是,您可以通过查看phpinfo()页面获得证明。最重要的应该是configure命令(告诉你PHP构建的偏好的那些命令)。如果你找不到选项'' - with-mysql = /
short answers:
1. probably

2. that depends on the distributors of the according PHP build. I think the PHP 5 source code has general support, may it be enabled by default or not.

long answers:
I''m not aware that MySQL support has been cancelled on PHP 5. nevertheless, you can get proof of that by looking at the phpinfo() page. just on top should be the configure commands (the ones that tell you with what preferences your PHP was build). if you can''t find the option ''--with-mysql=/


path''(


path是PHP的路径's mysql文件)(或者有一个选项''--with-mysql'')我怀疑从错误信息,然后你必须得到另一个PHP构建或你必须自己构建它...


为避免重新安装,您可以尝试MDB2 PEAR包(在) PEAR :: PHP扩展和应用程序库


问候
path is the path to PHP''s mysql files)(or alternatively there is the option ''--without-mysql'') what I suspect from the error message, then you have to either get another PHP build or you have to build it yourself...

to avoid reinstalling you can try the MDB2 PEAR package (at PEAR :: The PHP Extension and Application Repository)

regards


这篇关于致命错误:调用未定义的函数mysql_connect()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆