468,768 Members | 1,657 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,768 developers. It's quick & easy.

Fatal error: Call to undefined function pg_connect() in

274 100+
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.
Sep 5 '08 #1
2 25167
5,058 Expert 4TB

This happens when the PostgreSQL module is missing.

Make sure that you uncomment / create the extension line in you php.ini.
Expand|Select|Wrap|Line Numbers
  1. extension=pgsql.so ; For Unix
  2. extension=pgsql.dll ; For Windows
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.
Sep 11 '08 #2
274 100+
I actually I was wrong in specifying version number for the php I have installed. I fixed it .
Oct 27 '08 #3

Post your reply

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

Similar topics

4 posts views Thread by gc | last post: by
8 posts views Thread by Tim Tyler | last post: by
1 post views Thread by drewmania001 | last post: by
1 post views Thread by Chifo | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.