pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_connect
2+ messages / 2 participants
[nested] [flat]

* pg_connect
@ 2003-03-01 11:12 Travel Jadoo <jadoo@xs4all.nl>
  0 siblings, 0 replies; 2+ messages in thread

From: Travel Jadoo @ 2003-03-01 11:12 UTC (permalink / raw)
  To: pgsql-php

I know connecting should be easy but I am foxed why I cannot seem to
connect on my local machine as http://127.0.0.1/~alf/test2.php

I tried pg_connect("host=localhost port=5432 dbname=db user=alf") and
the same without the host and port which should be sufficient.

The error I get is "Fatal error: Call to undefined function:
pg_connect()". This seems to suggest that PHP is not configured with
pgslq. However, my phpinfo() shows version = PHP 4.2.2 and configured
includes '--with-pgsql=shared' (standard installation with RedHat 8)

My /var/lib/pgsql/data/pg_hba.conf I have set as follows:
# TYPE     DATABASE    IP_ADDRESS    MASK               AUTH_TYPE 
AUTH_ARGUMENT

local      all                                          trust
host       all         127.0.0.1     255.255.255.255    trust


Any ideas what I am overlooking?

Alfred Tuinman





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

* pg_connect
@ 2003-05-23 15:25 thoyerj@ufrima.imag.fr
  0 siblings, 0 replies; 2+ messages in thread

From: thoyerj@ufrima.imag.fr @ 2003-05-23 15:25 UTC (permalink / raw)
  To: pgsql-php

Hi everybody, 

Excuse me for my bad english... 

I've installed Red hat Linux 8.0, and php 4.2.2, apache 2.0.40 and postgresql 
are installed automatically. 

Apache and php runs very well (i created a file "test.php" with the 
instruction phpinfo() and the information appears very well when i load my 
page in my browser, in particular i see the configure command of php and --
with-apxs --with-pgsql=shared take part of it). 

In an other php file, i try to connect a postgres database with the command 
pg_connect. 
And it appears in my browser this error message: 
Fatal error: Call to undefined function: pg_connect() ... 

the file httpd.conf contents: 
LoadModule php4_module modules/libphp4.so 

the file php.ini contents: 
pgsql.allow_persistent= On 

what should i do? 

Thanks for any help 

Johann






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


end of thread, other threads:[~2003-05-23 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-03-01 11:12 pg_connect Travel Jadoo <jadoo@xs4all.nl>
2003-05-23 15:25 pg_connect thoyerj@ufrima.imag.fr

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