Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make PHP work with PostgreSQL on Windows

Status
Not open for further replies.

davidchardonnet

Programmer
Mar 21, 2001
167
FR
Hello

My configuration:
Windows 2000 Pro (development platform)
PostgresSQL 8.0.1 + Apache 1.3.33 + PHP 4.3.10

I just left MySQL for PostgreSQL

Unfortunately I get the following error message when I try to connect to the server:

Fatal error: Call to undefined function: pg_connect() in c:\program files\apache group\apache\htdocs\connexion.php on line 10


How can I make PHP work with PostgreSQL on Windows?

Thank you

David

 
find your php.ini file

find the row

;extension=php_pgsql.dll

and uncomment it or if it doesn't exist put

extension=php_pgsql.dll

then restart apache
 
I've done this, but nothing changes. What versions of php/postgresql/Apache did you make work together?
 
php 4.3.10 / 5.0.3
postgresql 8.0.0

apache don't remember

are you sure your php.ini is actually the one that php reads? to be sure try to put it in windows directory

or just see with phpinf() where the php expects the php.ini file to be and put it there

and check in php.ini if the extension_dir directive points to the directory where php_pgsql.dll resides
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top