Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 5th, 2008, 11:22 PM
Needs Regular Fix
 
Join Date: Sep 2007
Location: Canada
Posts: 264
Default Fatal error: Call to undefined function pg_connect() in

I get following error:

Fatal error: Call to undefined function pg_connect() in C:\www\desiorb.dev\public_html\httpdocs\index.php on line 18

said line is to connect to postres pg_Connect....

I also want to tell that:
I am setting up virtual host on my computer, apache works for projects that don't have database support.
I uncomment php.ini file for postgres.
Apache runs fine there is no error.
I have right user name and password entered i am sure about that part.
I re-installed postgres to make sure it works.
I started the database.
I can see databse conenctivtivity in pgAdmin

any other suggestions?

Thanks in advance.
Reply
  #2  
Old September 11th, 2008, 02:08 AM
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Age: 22
Posts: 2,777
Default

Hi.

This happens when the PostgreSQL module is missing.

Make sure that you uncomment / create the extension line in you php.ini.
Like:
Expand|Select|Wrap|Line Numbers
  1. extension=pgsql.so ; For Unix
  2. extension=pgsql.dll ; For Windows
  3.  
Also, make sure that the file actually exist in the directory specified by the extension_dir directive.

You can look for the PostgreSQL info in the phpinfo() output to see if it has been loaded properly. If you can't find it, it hasn't been loaded.
Reply
  #3  
Old October 27th, 2008, 08:03 PM
Needs Regular Fix
 
Join Date: Sep 2007
Location: Canada
Posts: 264
Default

thanks,
I actually I was wrong in specifying version number for the php I have installed. I fixed it .
Regards
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles