pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: pg calls not working from within Apache
6+ messages / 5 participants
[nested] [flat]

* Re: pg calls not working from within Apache
@ 2004-08-04 12:41  Andres Ferrando <anferr@mecon.gov.ar>
  parent: bp1974@comcast.net
  2 siblings, 0 replies; 6+ messages in thread

From: Andres Ferrando @ 2004-08-04 12:41 UTC (permalink / raw)
  To: pgsql-php

Hi,
PHP is loaded as Apache's module or CGI? Remember that this module is 
not the same that the script interpreter. You can compare the phpinfo() 
output from both. You have postgresql client libraries in this machine?


bp1974@comcast.net escribió:

>Hi,
>  I am trying to get a PostGresql <-->PHP<-->Apache working and am running to the well documented problem of :
>
>Fatal error: Call to undefined function: pg_connect() in /var/www/html/dbview.php on line 14
>
>I have checked and double checked that php is compiled in with pgsql. List of compiled in modules looks like:
>[PHP Modules]
>SPL
>SQLite
>SimpleXML
>calendar
>ctype
>dba
>dom
>ftp
>gettext
>iconv
>libxml
>openssl
>pcre
>pgsql <---
>posix
>session
>soap
>standard
>tokenizer
>xml
>zlib
>
>Apache and PHP seem to work, as evidenced by running the basic phpinfo() script. I also checked wheter pg calls work  when running from the script interpreter, i.e. running a php script. 
>However, I am not able to get the same script running from within a browser. 
>Can anyone point out what little bit of the puzzle I might be missing?
>I have pgsql 7.4.3 PHP 4.3.2 and Apache 2.0.
>
>Any help appreciated.
>
>thanks,
>Balaji
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: the planner will ignore your desire to choose an index scan if your
>      joining column's datatypes do not match
>  
>

-- 
Andrés Ferrando <anferr@mecon.gov.ar>
Centro de Desarrollo de Sistemas
Secretaria de Industria, Comercio y PyME




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pg calls not working from within Apache
@ 2004-08-04 17:16  bp1974@comcast.net
  0 siblings, 3 replies; 6+ messages in thread

From: bp1974@comcast.net @ 2004-08-04 17:16 UTC (permalink / raw)
  To: pgsql-php

Hi,
  I am trying to get a PostGresql <-->PHP<-->Apache working and am running to the well documented problem of :

Fatal error: Call to undefined function: pg_connect() in /var/www/html/dbview.php on line 14

I have checked and double checked that php is compiled in with pgsql. List of compiled in modules looks like:
[PHP Modules]
SPL
SQLite
SimpleXML
calendar
ctype
dba
dom
ftp
gettext
iconv
libxml
openssl
pcre
pgsql <---
posix
session
soap
standard
tokenizer
xml
zlib

Apache and PHP seem to work, as evidenced by running the basic phpinfo() script. I also checked wheter pg calls work  when running from the script interpreter, i.e. running a php script. 
However, I am not able to get the same script running from within a browser. 
Can anyone point out what little bit of the puzzle I might be missing?
I have pgsql 7.4.3 PHP 4.3.2 and Apache 2.0.

Any help appreciated.

thanks,
Balaji



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg calls not working from within Apache
@ 2004-08-04 17:26  Thom Dyson <TDyson@sybex.com>
  parent: bp1974@comcast.net
  2 siblings, 0 replies; 6+ messages in thread

From: Thom Dyson @ 2004-08-04 17:26 UTC (permalink / raw)
  To: bp1974@comcast.net; +Cc: pgsql-php





Going out on a limb here.  Does the user that apache runs under have access
to the pg so files?

Thom Dyson
Director of Information Services
Sybex, Inc.



pgsql-php-owner@postgresql.org wrote on 08/04/2004 10:16:06 AM:

> Hi,
> I am trying to get a PostGresql <-->PHP<-->Apache working and am
> running to the well documented problem of :
>
> Fatal error: Call to undefined function: pg_connect() in
> /var/www/html/dbview.php on line 14




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg calls not working from within Apache
@ 2004-08-05 07:47  Justin Wyer <justin@isogo.co.za>
  parent: bp1974@comcast.net
  2 siblings, 1 reply; 6+ messages in thread

From: Justin Wyer @ 2004-08-05 07:47 UTC (permalink / raw)
  To: pgsql-php

bp1974@comcast.net wrote:

>Hi,
>  I am trying to get a PostGresql <-->PHP<-->Apache working and am running to the well documented problem of :
>
>Fatal error: Call to undefined function: pg_connect() in /var/www/html/dbview.php on line 14
>
>  
>
Call to undefined function, means the pgsql extension is infact not 
there. Do you have multiple php's on this machine? Do you have a 
misconfigured php.ini lying around in your root directory, that php will 
read when its been run from apache. Remember php running from apache 
will read configuration files that php running from CLI wouldn't.

cheers



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg calls not working from within Apache
@ 2004-08-08 03:22  Balaji Prasad <bp1974@comcast.net>
  parent: Justin Wyer <justin@isogo.co.za>
  0 siblings, 1 reply; 6+ messages in thread

From: Balaji Prasad @ 2004-08-08 03:22 UTC (permalink / raw)
  To: pgsql-php

Thank You. I got it working shortly after posting it here. I indeed had 
multiple PHPs on the system and the one apache was detecting did not have 
pgsql support built in. It was just a matter of deleting the "wrong" php 
and things started working like a charm.



On Thu, 05 Aug 2004 09:47:07 +0200, Justin Wyer <justin@isogo.co.za> wrote:

> bp1974@comcast.net wrote:
>
>> Hi,
>>  I am trying to get a PostGresql <-->PHP<-->Apache working and am 
>> running to the well documented problem of :
>>
>> Fatal error: Call to undefined function: pg_connect() in 
>> /var/www/html/dbview.php on line 14
>>
>>
> Call to undefined function, means the pgsql extension is infact not 
> there. Do you have multiple php's on this machine? Do you have a 
> misconfigured php.ini lying around in your root directory, that php will 
> read when its been run from apache. Remember php running from apache 
> will read configuration files that php running from CLI wouldn't.
>
> cheers
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: pg calls not working from within Apache
@ 2004-08-08 13:20  Justin Wyer <justin@isogo.co.za>
  parent: Balaji Prasad <bp1974@comcast.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Justin Wyer @ 2004-08-08 13:20 UTC (permalink / raw)
  To: pgsql-php

Balaji Prasad wrote:

> Thank You. I got it working shortly after posting it here. I indeed 
> had multiple PHPs on the system and the one apache was detecting did 
> not have pgsql support built in. It was just a matter of deleting the 
> "wrong" php and things started working like a charm.
>
good stuff, glad i could help



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2004-08-08 13:20 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04 17:16 pg calls not working from within Apache bp1974@comcast.net
2004-08-04 12:41 ` Andres Ferrando <anferr@mecon.gov.ar>
2004-08-04 17:26 ` Thom Dyson <TDyson@sybex.com>
2004-08-05 07:47 ` Justin Wyer <justin@isogo.co.za>
2004-08-08 03:22   ` Balaji Prasad <bp1974@comcast.net>
2004-08-08 13:20     ` Justin Wyer <justin@isogo.co.za>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox