Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL 8.1 + PHP5.1.x/4.4.2 + Apache 2.0.55/1.3.34 PROBLEM!! PLEASE HELP

From: "chris smith" <dmagick(at)gmail(dot)com>
To: "belfegor666(at)gazeta(dot)pl" <belfegor666(at)gazeta(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.1 + PHP5.1.x/4.4.2 + Apache 2.0.55/1.3.34 PROBLEM!! PLEASE HELP
Date: 2006-04-27 04:16:15
Message-ID: 3c1395330604262116l37bdcae6o6a8722d5117d24fc@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On 4/27/06, belfegor666(at)gazeta(dot)pl <belfegor666(at)gazeta(dot)pl> wrote:
> Help! I was trying to make an installation of PHP 5.1.2 + Apache
> 2.0.55 + PostgreSQL 8.1 on Windows 2003 Server, and I'm stuck. I
> got PHP to work with Apache quite smoothly, so did I marry PHP with
> PostgreSQL - scripts connecting to the database work fine from
> windows command line, except that the following code:
>
> if (extension_loaded("php_pgsql")) {
> echo "PGSQL loaded!";
> }
>
> returns no message. Still database queries work fine. Trouble starts
> when I try to open a page in my browser - then I get an error
> message like this:
>
> Error: call to udefined function pg_connect()...
>
> I changed the php.ini file a billion times, trying to figure out
> what to set in the "extension_dir" and "extension=php_pgsql.dll"
> lines, and I tried at least as many times to change apache's
> httpd.conf file so that the php module is loaded properly. And it
> is, as far as I'm concerned - the phpinfo() page shows without a
> problem. One peculiar thing about it is that in the "Loaded
> modules" section (don't remember the exact name) there's absolutely
> no sign of the pgsql module.

you could change the first check to:

if (!function_exists('pg_connect')) {
  die("no pg_connect");
}

What does:

print_r(get_loaded_extensions());

show?

Anything regarding pgsql?

Does your server keep logs? Maybe something in there will give you
some ideas about what's going on..

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

pgsql-general by date

Next:From: Jim C. NasbyDate: 2006-04-27 04:52:43
Subject: Re: [HACKERS] pg_dump
Previous:From: Will ReeseDate: 2006-04-27 04:09:53
Subject: Re: Autovacuum Logging

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group