返回有关PHP安装mySQL兼容性的信息 [英] Return info about PHP installation mySQL compatibility

查看:60
本文介绍了返回有关PHP安装mySQL兼容性的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用phpinfo()在我们的主机服务器上确认mySQL的设置,

并且它没有返回准确的信息。


phpinfo()返回mySQL客户端API版本3.23.54(uselss for

me),其中mySQL数据库上的SELECT VERSION()查询返回

版本5.0.27(正是我们需要的)。我认为用PHP中的mySQL库有一些错误




有没有更多的方法来查看php的mySQL设置?

显然我无法访问安装,因为它位于远程

服务器上 - megasqlservers.com


我问的原因是我在我们的

主机服务器上安装了购物车,目前正在返回:


* *************************************

警告:mysql_pconnect() [function.mysql-pconnect]:无法通过套接字''/tmp/mysql.sock'连接到

本地MySQL服务器''(2)


警告:mysql_select_db()[function.mysql-select-db]:无法通过套接字''/tmp/mysql.sock'连接

到本地MySQL服务器'(2)


警告:mysql_select_db()[function.mysql-select-db]:无法建立

服务器的链接

警告: session_start()[function.session-start]:无法发送会话

缓存限制器 - 已发送的标头


2002:无法连接到本地MySQL服务器通过套接字''/ tmp /

mysql.sock''(2)

****************** ********************

(网页地址和目录结构已被删除此

消息)


我在自己的盒子上安装了Apache,PHP和mySQL,并使用与遥控器相同的安装文件安装了

购物车

服务器,一切正常。


我正在尝试诊断问题,因为我们的主持人似乎不知道

什么'正在进行。


有什么想法吗?


问候,


Robin

I''ve used phpinfo() to confirm settings for mySQL on our host server,
and it''s not returning accurate info.

phpinfo() returns a mySQL client API version of 3.23.54 (uselss for
me), where as a SELECT VERSION() query on the mySQL database returns
version 5.0.27 (exactly what we need). I think there''s something wrong
with the mySQL library in PHP.

Is there any more thurough method of seeing php''s settings for mySQL?
Obviously I don''t have access to the installation as it''s on a remote
server - megasqlservers.com

The reason I''m asking is that I''ve installed a shopping cart on our
host server which is currently returning:

**************************************
Warning: mysql_pconnect() [function.mysql-pconnect]: Can''t connect to
local MySQL server through socket ''/tmp/mysql.sock'' (2)

Warning: mysql_select_db() [function.mysql-select-db]: Can''t connect
to local MySQL server through socket ''/tmp/mysql.sock'' (2)

Warning: mysql_select_db() [function.mysql-select-db]: A link to the
server could not be established

Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent

2002: Can''t connect to local MySQL server through socket ''/tmp/
mysql.sock'' (2)
**************************************
(web addreses and directory structure has been removed for this
message)

I installed Apache, PHP and mySQL on my own box and installed the
shopping cart using the same installation files as on the remote
server, and everything works correctly.

I''m trying to diagnose the problem as our host doesn''t seem to know
what''s going on.

Any thoughts?

Regards,

Robin

推荐答案

1月10日,11:03 * am,Robin S. < lasern ... @ hotmail.comwrote:
On Jan 10, 11:03*am, "Robin S." <lasern...@hotmail.comwrote:

>

phpinfo()返回mySQL客户端API版本3.23.54 (uselss for

me),其中mySQL数据库上的SELECT VERSION()查询返回

版本5.0.27(正是我们需要的)。我认为用PHP中的mySQL库有一些错误




有什么想法吗?


问候,


Robin
>
phpinfo() returns a mySQL client API version of 3.23.54 (uselss for
me), where as a SELECT VERSION() query on the mySQL database returns
version 5.0.27 (exactly what we need). I think there''s something wrong
with the mySQL library in PHP.

Any thoughts?

Regards,

Robin



小更新:


我刚刚安装了使用

远程SQL服务器(megasqlservers.com)在我的本地盒子上的购物车软件,它工作。所以我猜这是'/ b $ b不是mySQL的问题。


PHP有什么问题?


问候,


Robin

Small update:

I just installed the shopping cart software on my local box using the
remote SQL server (megasqlservers.com) and it worked. So I guess it''s
not a mySQL problem.

What could be wrong with PHP?

Regards,

Robin


2008年1月10日星期四17:25:15 +0100,Robin S.< la*******@hotmail.com写道:
On Thu, 10 Jan 2008 17:25:15 +0100, Robin S. <la*******@hotmail.comwrote:

1月10日,11:03 * am,Robin S. < lasern ... @ hotmail.comwrote:
On Jan 10, 11:03*am, "Robin S." <lasern...@hotmail.comwrote:

>>
phpinfo()返回mySQL客户端API版本3.23.54(uselss对于
me),其中mySQL数据库上的SELECT VERSION()查询返回版本5.0.27(正是我们需要的)。我觉得PHP中的mySQL库有什么问题。

有什么想法吗?

问候,

罗宾
>>
phpinfo() returns a mySQL client API version of 3.23.54 (uselss for
me), where as a SELECT VERSION() query on the mySQL database returns
version 5.0.27 (exactly what we need). I think there''s something wrong
with the mySQL library in PHP.

Any thoughts?

Regards,

Robin



小更新:


我刚刚使用
$ b $在我的本地包装盒上安装了购物车软件b远程SQL服务器(megasqlservers.com),它工作。所以我猜它是'b $ b不是mySQL问题。


PHP有什么问题?


Small update:

I just installed the shopping cart software on my local box using the
remote SQL server (megasqlservers.com) and it worked. So I guess it''s
not a mySQL problem.

What could be wrong with PHP?



嗯,如果你定义它的主机名/ ip而不是使用

localhost会怎么样?

-

Rik Wasmus

Hmm, what happens if you define it''s hostname/ip instead of using
localhost?
--
Rik Wasmus


" Robin S."写道:
"Robin S." wrote:

>

我已经使用phpinfo()来确认我们主机服务器上mySQL的设置,

并且它没有返回准确的信息。


phpinfo()返回mySQL客户端API版本3.23.54(uselss for

me),在mySQL数据库上的SELECT VERSION()查询返回

版本5.0.27(正是我们需要的)。我认为使用PHP中的mySQL库有一些错误


>
I''ve used phpinfo() to confirm settings for mySQL on our host server,
and it''s not returning accurate info.

phpinfo() returns a mySQL client API version of 3.23.54 (uselss for
me), where as a SELECT VERSION() query on the mySQL database returns
version 5.0.27 (exactly what we need). I think there''s something wrong
with the mySQL library in PHP.



您的提供商是否仍使用PHP4?那么这个API版本应该是

。 IIRC版本静态链接到PHP。至少在Windows的PHP版本中,我不知道Linux / Unix版本。


但这不应该是一个大的问题,即使这个stoneage API仍然与最新的MySQL兼容。您只需要记住在服务器上使用

旧密码选项,否则在连接时会出现''客户端没有

支持身份验证协议''错误数据库,

但这似乎不是你的问题。


当然你不能使用任何新的MySQL功能(交易,

准备好的报表等)但你无法使用这些与mysql API

无论如何,你必须更新到PHP5并使用mysqli API代替

来使用所有新的和酷的功能。如果你的主机没有更新到
PHP5但告诉他们这样做,PHP4被认为已被弃用,并且从1.1.2008开始不支持

。如果他们已经在使用PHP5,他们必须

在他们的搜索中某处有一个stoneage扩展或客户端库

路径被加载而不是最新的路径。


它看起来像是主机端的配置问题。


PS:您可以从本地连接到主机的MySQL服务器< br $> b $ b电脑?那是一场安全噩梦!你应该考虑在任何情况下切换

主机。


再见!

Does your provider still use PHP4? Then this API version should be
expected. IIRC that version was statically linked into PHP. At least in
the windows version of PHP, I don''t know about Linux/Unix versions.

But that shouldn''t be a big problem, even this stoneage API is still
compatible with the latest MySQL. You just have to remember to use the
old-passwords option on the server or you will get the ''Client does not
support authentication protocol'' error when connecting to the database,
but that doesn''t seem to be your problem.

And of course you can''t use any of the new MySQL features (transactions,
prepared statements, etc.) but you couldn''t use these with the mysql API
anyway, you would have to update to PHP5 and use the mysqli API instead
to use all the new and cool features. If your host hasn''t updated to
PHP5 yet tell them to do so, PHP4 is considered deprecated and is
unsupported as of 1.1.2008. If they are already using PHP5 they must
have a stoneage extension or client library somewhere in their search
path that gets loaded instead of the up to date one.

It looks to me like a configuration problem on your hosts side.

P.S.: You can connect to the MySQL server of your host from your local
computer? That''s a security nightmare! You should consider switching
hosts in any case.

Bye!


这篇关于返回有关PHP安装mySQL兼容性的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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