By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

Fatal error: Call to undefined function pg_connect()

P: 7
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

Expert 100+
P: 534
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

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

Expert 100+
P: 534
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
  2. echo extension_loaded('pgsql');
which will print 1 if you have pgsql library available on your server.
Mar 16 '07 #4

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

Expert 100+
P: 534
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

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

Sign in to post your reply or Sign up for a free account.