[MS4W-Users] Fatal error: Call to undefined function pg_connect()

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Wed May 26 13:59:45 EST 2010

I created a php that works well when launched from a browser.

But it doesn't from a command line
PHP myFile.php

I get this error
Fatal error: Call to undefined function pg_connect()

It seems that php.exe does not recognize postgres functions.

In \ms4w\Apache\cgi-bin\php.ini I have this:
extension=php_pgsql.dll and this dll is in \ms4w\Apache\php\ext

PATH variable contains this
C:\Program Files\PostgreSQL\8.3\bin;

phpinfo() give me this

What should I do to be able to call the postgres functions when using 
php.exe from a command line?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20100526/b73c5424/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 12483 bytes
Desc: not available
Url : http://lists.maptools.org/pipermail/ms4w-users/attachments/20100526/b73c5424/attachment.gif 

More information about the MS4W-Users mailing list