Thread: Problem when connect with pgsql

Problem when connect with pgsql

From
Gita Purnamasari
Date:
Hello,

I am new on pgsql-php, whe i tried my new php script to connect with pgsql
occur message : Call to undefined function pg_connect() when i try to
connect
with pgsql, is there some thing to be set ?
Thaks




Re: Problem when connect with pgsql

From
Damián Culotta
Date:
It's seems taht you don't have the Php extensions to work with PostgreSql.
Are You using Windows or Linux?.

----- Original Message -----
From: "Gita Purnamasari" <gitapsari@gmail.com>
To: <pgsql-php@postgresql.org>
Sent: Wednesday, June 14, 2006 5:56 AM
Subject: [PHP] Problem when connect with pgsql


> Hello,
>
> I am new on pgsql-php, whe i tried my new php script to connect with pgsql
> occur message : Call to undefined function pg_connect() when i try to
> connect
> with pgsql, is there some thing to be set ?
> Thaks
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
>



Re: Problem when connect with pgsql

From
Devrim GUNDUZ
Date:
Hi Gita,

On Wed, 2006-06-14 at 15:56 +0700, Gita Purnamasari wrote:
> I am new on pgsql-php, whe i tried my new php script to connect with
> pgsql occur message : Call to undefined function pg_connect() when i
> try to connect with pgsql, is there some thing to be set ?

Either you haven't enabled PostgreSQL support in your php.ini, or you
haven't installed pgsql extensions for PHP. The solution depends on your
operating system. For example for Linux variants, install php-pgsql (or
a similar name) package to enable PostgreSQL support for PHP. I'm not
sure how Windows guys do that.

Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/



Re: Problem when connect with pgsql

From
Damián Culotta
Date:
You need to download the extensions for Php.
You have to download de .zip version of Php. In that file you have the
extensions.
Copy the extensions into your Php directory, then you have to change your
php.ini configuration.
First, you have to indicate the extensions_dir, I supouse that you have to
write:

extension_dir = "c:\php\extensions"

After that, you have to uncomment the extension=php_pgsql.dll. (Have to
erase the ";").

Sorry for my bad english, I'm out of practice.


----- Original Message -----
From: "Gita Purnamasari" <gitapsari@gmail.com>
To: "Damián Culotta" <dculotta@fibertel.com.ar>
Sent: Wednesday, June 14, 2006 7:12 AM
Subject: Re: [PHP] Problem when connect with pgsql


>I am using windows
>
> Damián Culotta wrote:
>
>> It's seems taht you don't have the Php extensions to work with
>> PostgreSql.
>> Are You using Windows or Linux?.
>>
>> ----- Original Message ----- From: "Gita Purnamasari"
>> <gitapsari@gmail.com>
>> To: <pgsql-php@postgresql.org>
>> Sent: Wednesday, June 14, 2006 5:56 AM
>> Subject: [PHP] Problem when connect with pgsql
>>
>>
>>> Hello,
>>>
>>> I am new on pgsql-php, whe i tried my new php script to connect with
>>> pgsql
>>> occur message : Call to undefined function pg_connect() when i try to
>>> connect
>>> with pgsql, is there some thing to be set ?
>>> Thaks
>>>
>>>
>>>
>>>
>>> ---------------------------(end of broadcast)---------------------------
>>> TIP 1: if posting/reading through Usenet, please send an appropriate
>>>       subscribe-nomail command to majordomo@postgresql.org so that your
>>>       message can get through to the mailing list cleanly
>>>
>>>
>>
>>
>>
>
>
>