|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-11-03 21:50 UTC] kalle@php.net
-Status: Open
+Status: Bogus
[2010-11-03 21:50 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 05:00:02 2025 UTC |
Description: ------------ <?php $database=pg_connect("host=localhost dbname=test user=postgres"); if(!$database) { die("Could not connect -> " .pg_last_error(). pg_errormessage($database)); } ?> Test script: --------------- <?php $database=pg_connect("host=localhost dbname=test user=postgres"); if(!$database) { die("Could not connect -> " .pg_last_error(). pg_errormessage($database)); } else echo "database connected"; ?> while executing above mentioned program it is throwing aPHP Fatal error: Call to undefined function pg_connect() in /srv/www/htdocs/pg.php on line 2 Expected result: ---------------- database connected. Hi, Can anyone tell me what would be the mistake in the above mentioned program, when I execute this program simply it is throwing an error as : Call to undefined function pg_connect(),I can able to connect from psql separately but while trying to connect it from php it is throwing error.