pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedcan't connect to a postgreSQL database from PHP
3+ messages / 3 participants
[nested] [flat]
* can't connect to a postgreSQL database from PHP
@ 2002-08-11 13:22 Carlos <almah@wanadoo.es>
0 siblings, 2 replies; 3+ messages in thread
From: Carlos @ 2002-08-11 13:22 UTC (permalink / raw)
To: pgsql-php
HelpHi everybody!
I've got a problem using PHP to connect to a postgre database, it seems that
the function for postgre are not recognized or something like that because a
I get the following error in the web navigator:
"Fatal Error: Calling to undefined function pg_connect() ...)"
I configured php with: ./configure --with-apache=/usr/local/apache_1.3.26
--with-pgsql=shared
--enable-track-vars
--with-xml
after that I reconfigured Apache to take into account php:
./configure --prefix=/usr/local/apache_1.3.26
--activate-module=src/module
s/php4/libphp4.a
Any idea to solve it?
Thank you all.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: can't connect to a postgreSQL database from PHP
@ 2002-08-11 15:06 Benj <bastabob@flash.net.ph>
parent: Carlos <almah@wanadoo.es>
1 sibling, 0 replies; 3+ messages in thread
From: Benj @ 2002-08-11 15:06 UTC (permalink / raw)
To: pgsql-php
Carlos wrote:
> I get the following error in the web navigator:
> "Fatal Error: Calling to undefined function pg_connect() ...)"
It seems that PHP can't find your pgsql dynamic extension.
Have you edited php.ini to have the correct lines:
extension_dir = /path/to/php/extensions
extension=pgsql.so
--
Benjamin Oris Jr. <bastabob@flash.net.ph>
ImagineAsia Animation Studio
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: can't connect to a postgreSQL database from PHP
@ 2002-08-12 15:40 scott.marlowe <scott.marlowe@ihs.com>
parent: Carlos <almah@wanadoo.es>
1 sibling, 0 replies; 3+ messages in thread
From: scott.marlowe @ 2002-08-12 15:40 UTC (permalink / raw)
To: Carlos <almah@wanadoo.es>; +Cc: pgsql-php
On Sun, 11 Aug 2002, Carlos wrote:
> HelpHi everybody!
>
> I've got a problem using PHP to connect to a postgre database, it seems that
> the function for postgre are not recognized or something like that because a
> I get the following error in the web navigator:
> "Fatal Error: Calling to undefined function pg_connect() ...)"
>
> I configured php with: ./configure --with-apache=/usr/local/apache_1.3.26
> --with-pgsql=shared
> --enable-track-vars
> --with-xml
Why do you have --with-pgsql=shared? Normally, you just need the switch
--with-pgsql.
when you ran the ./configure script, did you save the output and see
whether it said it found and configured postgresql? My bet is that it
failed during ./configure and you didn't notice, as it won't cause the
./configure script to error out.
Also, I'd recommend compiling apache for DSO support, i.e. using the
--with-apxs switch setting. I've seen problems show up with using the .a
libs instead of .so. Since shared objects seems the preferred
methodology, it seems like problems with configuration that affect dso get
fixed much quicker than static libs.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-08-12 15:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-11 13:22 can't connect to a postgreSQL database from PHP Carlos <almah@wanadoo.es>
2002-08-11 15:06 ` Benj <bastabob@flash.net.ph>
2002-08-12 15:40 ` scott.marlowe <scott.marlowe@ihs.com>
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