Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 280376325C9 for ; Fri, 29 Jan 2010 21:08:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75202-04 for ; Sat, 30 Jan 2010 01:07:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f214.google.com (mail-ew0-f214.google.com [209.85.219.214]) by mail.postgresql.org (Postfix) with ESMTP id 4F53063249E for ; Fri, 29 Jan 2010 21:07:49 -0400 (AST) Received: by ewy6 with SMTP id 6so1583548ewy.34 for ; Fri, 29 Jan 2010 17:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=IlNMWmsmWbQI3p54MA/GV/H2xRbJH9PKTwaZhnjGpz0=; b=ayz0Nh5R7uB3bSI0c/rybasgMLq/zNkhZqXwHjoXz33Ct9VFfr5Udi6Wk+XEknwv+D 02IscqrPkbg2Krlh2krWILI3ngEj/M/7TEzHrKZdKJ7e4q+r3+VhHHjgrHOPcTMpusvV jYYX8mB+JP/PxpT8xTpjsYXynBPXbgP71xc8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=EZ0/LWAtoviFMhjFrKSzleAO8sxXlj978dbKhg35qbONssd0mq2Z8ZUSZ0lpVHO0kI YwGg9SN0sR7nBKvs2DHAGnIVQb5E/M9+M1yPxahi/GSAUXSUL32G6kOWw00nNNMysuEU ILBgqsWpcln/E9vBzzrrvFrR9qdk6nUvZgmjc= MIME-Version: 1.0 Received: by 10.216.89.139 with SMTP id c11mr592492wef.198.1264813667150; Fri, 29 Jan 2010 17:07:47 -0800 (PST) In-Reply-To: <4B62236F.1090200@gmail.com> References: <4B60DC23.9020404@gmail.com> <20100128084415.4d98823a.wmoran@potentialtech.com> <4B62236F.1090200@gmail.com> From: Gustavo Amarilla Santacruz Date: Fri, 29 Jan 2010 22:07:27 -0300 Message-ID: Subject: Re: Undefined function pg_connect() To: Chris Cc: Bill Moran , pgsql-php@postgresql.org Content-Type: multipart/alternative; boundary=0016e6dab0fd566b97047e5761d3 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201001/19 X-Sequence-Number: 4117 --0016e6dab0fd566b97047e5761d3 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jan 28, 2010 at 8:53 PM, Chris wrote: > 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/ > > Thank you, Chris *1) Does a phpinfo() page show it loading anything re: pgsql ?* No, no matter info on pgsql. *2) Anything in apache logs (/var/log/httpd/error.log probably) ?* Yes, i found this: . . . PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/curl.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/fileinfo.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/fileinfo.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/json.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/json.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/ldap.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/mysql.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 . . . * 3) 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 * Yes, the phpinfo page has this information. * 4) 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* Yes, the rpm put that file in /etc/php.d ---------------------------- Gustavo Amarilla --0016e6dab0fd566b97047e5761d3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, Jan 28, 2010 at 8:53 PM, Chris <= span dir=3D"ltr"><dmagick@gmail.com= > wrote:
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 di= splayed:

Starting httpd: [Thu Jan 28 20:27:39 2010] [warn] module perl_module is alr= eady loaded, skipping
[Thu Jan 28 20:27:39 2010] [warn] module php5_module is already loaded, ski= pping
httpd: Could not reliably determine the server's fully qualified domain= name, using localhost.localdomain for ServerName
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [ =A0OK =A0]


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 fo= r this, something in /var/log should have some info) ?


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

Configuration File (php.ini) Path =A0 =A0 =A0 /etc/php.ini
Scan this dir for additional .ini files =A0 =A0 =A0 =A0 /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=3Dpgsql.so

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


--
Postgresql & php tutorials
http://www.desig= nmagick.com/




Thank you, Chris



1) Does a phpinfo() page show it loading anything re: p= gsql ?

No, no matter info on pgsql.


2) Anyt= hing in apache logs (/var/log/httpd/error.log probably) ?

Yes, i found this:

.
.
.
PHP Warning:=A0 PHP Startup: Unable to load dynamic library = 9;./;/usr/lib/php/modules/;/usr/lib/pgsql/curl.so' - ./;/usr/lib/php/mo= dules/;/usr/lib/pgsql/curl.so: cannot open shared object file: No such file= or directory in Unknown on line 0
PHP Warning:=A0 PHP Sta= rtup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib= /pgsql/fileinfo.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/fileinfo.= so: cannot open shared object file: No such file or directory in Unknown on= line 0
PHP Warning:=A0 PHP Sta= rtup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib= /pgsql/json.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/json.so: cann= ot open shared object file: No such file or directory in Unknown on line 0<= /span>
PHP Warning:=A0 PHP Sta= rtup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib= /pgsql/ldap.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/ldap.so: cann= ot open shared object file: No such file or directory in Unknown on line 0<= /span>
PHP Warning:=A0 PHP Sta= rtup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib= /pgsql/mysql.so' - ./;/usr/lib/php/modules/;/usr/lib/pgsql/mysql.so: ca= nnot open shared object file: No such file or directory in Unknown on line = 0
.
.
.




3) On your phpinfo page, it should have something like th= is:

Configuration File (php.ini) Path =A0 =A0 =A0 /etc/php.ini
Scan this dir for additional .ini files =A0 =A0 =A0 =A0 /etc/php.d
<= br>

Yes, the phpinfo page has this information.


4) Check w= hether the rpm put a file in that extra directory, like:

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



Yes, the rpm put that file in /etc/php.d




------= ----------------------
Gustavo Amarilla

--0016e6dab0fd566b97047e5761d3--