364,111 Members | 2089 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

Fatal error: Call to undefined function pg_connect()

diamond1
P: 7
Hi:
How can solve this problem:

Fatal error: Call to undefined function pg_connect()

Thanks in advance
Mar 16 '07 #1
Share this Question
Share on Google+
6 Replies


michaelb
Expert 100+
P: 499
Which Postgres version are you using?
The client API, is that pgtcl?
Did you compile the server with TCL libraries?
Any other details that could help to understand your environment..?
Mar 16 '07 #2

diamond1
P: 7
I'm tryin to use PHP through dreamweaver8 to make a user interface for postgresql 8.2 database
Mar 16 '07 #3

michaelb
Expert 100+
P: 499
Make sure that Postgresql extension is available for you.

You can run phpinfo();, which will give you a lot of information, including all the available extensions. Look for section pgsql which has line items similar to these:

PostgreSQL Support enabled
PostgreSQL(libpq) Version 7.4.8
... ... ... ...


Or you can execute this code:
Expand|Select|Wrap|Line Numbers
  1.  
  2. echo extension_loaded('pgsql');
  3.  
which will print 1 if you have pgsql library available on your server.
Mar 16 '07 #4

diamond1
P: 7
Thanks for response BUT I tried the 2 methods with no result
when I use the second way the page appears empty (NO 1 or 0)

So, what I have to do?????????
Mar 17 '07 #5

michaelb
Expert 100+
P: 499
Apparently you don't have this extension available.
If you're running on your own server you should be able to install or load pgsql library.
If not, you may need to contact whoever owns the server.
Mar 17 '07 #6

elksa
P: 1
I was having the same problem...the thing is that when you´re using a PHP version above 5.2.5 in windows, you just can´t load the pgsql extension. You gotta install php 5.2.5 or an older version, or just install a newer one and overwrite php_pgsql.dll with the one from PHP 5.2.5. I tested both ways with excelent results.
Hope you can solve your problem...
May 31 '09 #7

Post your reply

Help answer this question



Didn't find the answer to your PostgreSQL Database question?

You can also browse similar questions: PostgreSQL Database