PostgreSQL驱动程序不工作? [英] PostgreSQL drivers not working?

查看:63
本文介绍了PostgreSQL驱动程序不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机上有PHP 5.3,PostgreSQL 8.2和Apache 2.2,还有一些

MySQL。

从PHP我可以连接到MySQL,但不能连接到PostgreSQL。这两个驱动程序都是在php.ini中取消注释的,但是phpinfo()只显示对MySQL的支持(对于Postgres没有什么

)。


pg_connect()导致状态500(内部服务器错误),并且PDO

版本抛出PDOException找不到驱动程序。


谢谢任何帮助。

解决方案

问候,bue。

回复你在2008年6月8日星期日的留言, 16:59:24,


我有PHP 5.3,



很抱歉,但......


php.netPHP 5.2.6发布

php.net [2008年5月1日]

php.net>

php.net PHP开发团队想宣布PHP 5.2.6的

php.netimmediateavailability。


我的计算机上有PostgreSQL 8.2和Apache 2.2,还有一些

MySQL。

从PHP我可以连接到MySQL,但不能连接到PostgreSQL 。这两个驱动程序都是在php.ini中取消注释的,但phpinfo()只显示对MySQL的支持(对于Postgres没有任何支持
)。



然后我猜php_pgsql没有被加载,很可能是因为不可用

所需的共享库到php / apache (取决于你运行你的php的方式是什么?)


pg_connect()导致状态500(内部服务器错误) ,



你可以在Apache错误日志中看到,500的情况是什么。


和PDO版本抛出PDOException找不到驱动程序。



错误的配置或连接字符串。

-

真诚的你,AnrDaemon< an *** ****@freemail.ru>


AnrDaemon写道:


问候,bue 。

回复你在2008年6月8日星期日16:59:24发来的消息,


>我有PHP 5.3 ,



很抱歉,但是......


php.netPHP 5.2.6发布

php.net [2008年5月1日]

php.net>

php.net PHP开发团队想宣布

php 5.2.6的PHP.netimmediateavailability。

http://snaps.php.net/

我尝试降级到5.2,同样的事情..


> PostgreSQL 8.2和Apache 2.2 on我的电脑和一些MySQL。
从PHP我可以连接到MySQL,但不能连接到PostgreSQL。这两个驱动程序在php.ini中都没有注释,但phpinfo()仅显示对MySQL的支持(对于Postgres没有任何支持)。



然后我猜php_pgsql没有被加载,很可能是由于

不可用所需的共享库到php / apache

(取决于你运行你的php的方式)。



什么是方式? :)

PHPIniDir在httpd.conf中设置

正如我所说的,mysql正在运行,所以PHP显然看到了扩展..而且

mysql PDO支持也可以从phpinfo中看到()


> pg_connect()导致状态500(内部服务器错误),



您可以在Apache错误日志中看到,500的情况是什么。



谢谢。

"调用未定义的函数pg_connect()"


>以及PDO版本抛出PDOException找不到驱动程序。



错误的配置或连接字符串。



什么配置?我想这就是我要问的: - /


bue写道:


I我的计算机上有PHP 5.3,PostgreSQL 8.2和Apache 2.2,还有一些

MySQL。

从PHP我可以连接到MySQL,但不能连接到PostgreSQL。这两个驱动程序都是在php.ini中取消注释的,但是phpinfo()只显示对MySQL的支持(对于Postgres没有什么

)。


pg_connect()导致状态500(内部服务器错误),并且PDO

版本抛出PDOException找不到驱动程序。


谢谢任何帮助。



您是否能够在此系统上连接到PostGres?您是否已经在计算机上安装了PostGres客户端库(并且可以访问
)? PostGres服务器是否正在运行(在计算机上你需要连接到
)?


-

= =================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


I have PHP 5.3, PostgreSQL 8.2 and Apache 2.2 on my computer, and some
MySQL.
From PHP I can connect to MySQL, but not to PostgreSQL. Both drivers are
uncommented in php.ini, but phpinfo() shows support only for MySQL (nothing
for Postgres).

pg_connect() leads to status 500 (internal server error), and the PDO
version throws PDOException "could not find driver".

Thanks for any help.

解决方案

Greetings, bue.
In reply to Your message dated Sunday, June 8, 2008, 16:59:24,

I have PHP 5.3,

So sorry, but...

php.netPHP 5.2.6 Released
php.net[01-May-2008]
php.net>
php.netThe PHP development team would like to announce the
php.netimmediateavailability of PHP 5.2.6.

PostgreSQL 8.2 and Apache 2.2 on my computer, and some
MySQL.
From PHP I can connect to MySQL, but not to PostgreSQL. Both drivers are
uncommented in php.ini, but phpinfo() shows support only for MySQL (nothing
for Postgres).

Then I guess that php_pgsql wasn''t loaded, most likely due to unavailability
of the required shared libraries to the php/apache (depends on the way you''re
running your php).

pg_connect() leads to status 500 (internal server error),

You can see in Apache error log, what was the case of that 500.

and the PDO version throws PDOException "could not find driver".

Wrong configuration or connection string.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>


AnrDaemon wrote:

Greetings, bue.
In reply to Your message dated Sunday, June 8, 2008, 16:59:24,

>I have PHP 5.3,


So sorry, but...

php.netPHP 5.2.6 Released
php.net[01-May-2008]
php.net>
php.netThe PHP development team would like to announce the
php.netimmediateavailability of PHP 5.2.6.

http://snaps.php.net/
I tried downgrading to 5.2, the same thing..

>PostgreSQL 8.2 and Apache 2.2 on my computer, and some
MySQL.
From PHP I can connect to MySQL, but not to PostgreSQL. Both drivers
are uncommented in php.ini, but phpinfo() shows support only for
MySQL (nothing for Postgres).


Then I guess that php_pgsql wasn''t loaded, most likely due to
unavailability of the required shared libraries to the php/apache
(depends on the way you''re running your php).

what "way"? :)
PHPIniDir is set in httpd.conf
As I said, mysql is working, so PHP obviously sees the extensions.. And the
mysql PDO support is also visible from phpinfo()

>pg_connect() leads to status 500 (internal server error),


You can see in Apache error log, what was the case of that 500.

Thanks.
"Call to undefined function pg_connect()"

>and the PDO version throws PDOException "could not find driver".


Wrong configuration or connection string.

What configuration? I guess that''s what I''m asking :-/


bue wrote:

I have PHP 5.3, PostgreSQL 8.2 and Apache 2.2 on my computer, and some
MySQL.
From PHP I can connect to MySQL, but not to PostgreSQL. Both drivers are
uncommented in php.ini, but phpinfo() shows support only for MySQL (nothing
for Postgres).

pg_connect() leads to status 500 (internal server error), and the PDO
version throws PDOException "could not find driver".

Thanks for any help.

Have you ever been able to connect to PostGres on this system? Do you
have the PostGres client libraries installed on your computer (and
accessible)? Is the PostGres server running (on the computer you''re
tying to connect to)?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于PostgreSQL驱动程序不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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