php unable to use pg functions

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
maxshrdlu
Forum Newbie
Posts: 1
Joined: Tue Nov 30, 2004 12:27 pm

php unable to use pg functions

Post by maxshrdlu »

Hi
I'm using PHP 4.3.9 and PostgreSQL 7.4.6 (from the linux distribution Fedora Core 3).
I'm unable to use pg_connect() method, for it's returning me false.
If I test the same php code from shell (i.e. php -f filename.php) it works.
If I test it fron web browser (http://localhost/...) it doesn't. I don't get any postgres error message, simply the returned "false" value.
Therefore it's not an issue about pg user accounts or passwords...
I made attempts with pg_hba.conf, without success.
Everything worked fine with previous versions of PHP and PG and I can't find out what is wrong now!
Help!

Max
User avatar
skehoe
Forum Commoner
Posts: 59
Joined: Sun Dec 22, 2002 5:57 am
Location: Denver

More information would be handy

Post by skehoe »

Can you post your connection string?
Post Reply