Re: Undefined function pg_connect()

From: Chris <dmagick(at)gmail(dot)com>
To: Gustavo Amarilla Santacruz <gusamasan(at)gmail(dot)com>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: Undefined function pg_connect()
Date: 2010-01-28 23:53:19
Message-ID: 4B62236F.1090200@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Gustavo Amarilla Santacruz wrote:
> Thank you, Bill Moran.
>
> My httpd is stoped, for default.
>
> I used the command: service httpd start; then, the following message was
> displayed:
>
> Starting httpd: [Thu Jan 28 20:27:39 2010] [warn] module perl_module is
> already loaded, skipping
> [Thu Jan 28 20:27:39 2010] [warn] module php5_module is already loaded,
> skipping
> httpd: Could not reliably determine the server's fully qualified domain
> name, using localhost.localdomain for ServerName
> [ OK ]
>
>
> But the pg_connect function is not recognized.

Does a phpinfo() page show it loading anything re: pgsql ?

Anything in apache logs (/var/log/httpd/error.log probably) ?

Could seLinux be involved somehow (I'm not really sure where to look for
this, something in /var/log should have some info) ?

On your phpinfo page, it should have something like this:

Configuration File (php.ini) Path /etc/php.ini
Scan this dir for additional .ini files /etc/php.d

Check whether the rpm put a file in that extra directory, like:

# cat /etc/php.d/pgsql.ini
; Enable pgsql extension module
extension=pgsql.so

If it didn't, try doing it manually (and restart httpd) and see if pgsql
shows up in your phpinfo page now.

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

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Jasen Betts 2010-01-29 10:52:52 Re: problem with connection to remote server
Previous Message Gustavo Amarilla Santacruz 2010-01-28 23:40:48 Re: Undefined function pg_connect()