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

Re: Problem with pg_connect() in PHP

From: ries van Twisk <pg(at)rvt(dot)dds(dot)nl>
To: "Edward W(dot) Rouse" <erouse(at)comsquared(dot)com>
Cc: "'pgsql-sql'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Problem with pg_connect() in PHP
Date: 2008-09-26 18:27:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
On Sep 26, 2008, at 12:23 PM, Edward W. Rouse wrote:

> Can I assume the missing ‘.”’ From the end of PG_PASSWORD is a cut  
> and paste error?
> Edward W. Rouse
> From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org 
> ] On Behalf Of James Kitambara
> Sent: Friday, September 26, 2008 1:22 AM
> To: pgsql-sql
> Cc: Kenichiro Arakaki; Ken Arakaki
> Subject: [SQL] Problem with pg_connect() in PHP
> 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

Did you re-start apache after you made the changes to the php.ini file?


In response to

pgsql-sql by date

Next:From: Lennin CaroDate: 2008-09-26 18:47:02
Subject: Re: Problem with pg_connect() in PHP
Previous:From: Oliveiros CristinaDate: 2008-09-26 18:09:24
Subject: Re: Finding sequential records

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