From: | Robert Edwards <bob(at)cs(dot)anu(dot)edu(dot)au> |
---|---|
To: | jameskitambara(at)yahoo(dot)co(dot)uk |
Cc: | pgsql-sql <pgsql-sql(at)postgresql(dot)org>, Kenichiro Arakaki <inek883(at)gmail(dot)com>, Ken Arakaki <arakaki(at)e-sir(dot)co(dot)jp> |
Subject: | Re: Problem with pg_connect() in PHP |
Date: | 2008-09-26 05:27:45 |
Message-ID: | 48DC72D1.5080605@cs.anu.edu.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Looks like you are missing the php_pgsql extension (I assume you
are running on a Windows server). On Debian GNU/Linux, it is called
php5-pgsql (or php4-pgsql, as appropriate). Not sure what it would
be called for Windows, but something similar.
Simply enabling it (by uncommenting the line in your php.ini file)
is not sufficient - the actual library needs to be installed as well.
Cheers,
Bob Edwards.
James Kitambara wrote:
> Dear Members of
>
> I have installed the Apache 2.0.61, PHP 5.2.4 and PostgreSQL 8.1 on my
> local computer.
>
> All three software were successfully tested. I changed
> “/;extension=php_pgsql.dll”/ to
>
> /“extension=php_pgsql.dll”/ in the php.ini file in order to enable
> PostgreSQL in PHP.
>
> The problem comes when I try to connect to the PostgreSQL Database using
> php function pg_connect
>
> $dbconn = pg_connect("host=".PG_HOST_NAME." port=".PG_PORT_NUM."
> dbname=".PG_DB_NAME." user=".PG_USER." password=".PG_PASSWORD);
>
> All the arguments in the function pg_connect() are defined.
>
> Unfortunately I am getting the Fatal error: “/Call to undefined function
> pg_connect() in C:\Web\html\Staff_Management\example1.php on line 23/”
>
> C:\Web\html is my document root.
>
> What could be the possible mistake?
>
> Anyone to assist me!
>
> Best regards,
>
> James Kitambara
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | James Kitambara | 2008-09-26 10:51:31 | Re: pg_dump in windows |
Previous Message | James Kitambara | 2008-09-26 05:21:37 | Problem with pg_connect() in PHP |