Doc #53218 [NEW]: couldnt able to connect PHP with POSTGRESQL

From: Date: Mon, 01 Nov 2010 11:54:02 +0000
Subject: Doc #53218 [NEW]: couldnt able to connect PHP with POSTGRESQL
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5456@lists.php.net to get a copy of this message
From: Operating system: Linux PHP version: 5.2.14 Package: PostgreSQL related Bug Type: Documentation Problem Bug description:couldnt able to connect PHP with POSTGRESQL 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. -- Edit bug report at http://bugs.php.net/bug.php?id=53218&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53218&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53218&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53218&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53218&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53218&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53218&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53218&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53218&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53218&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53218&r=support Expected behavior: http://bugs.php.net/fix.php?id=53218&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53218&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53218&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53218&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53218&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53218&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53218&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53218&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53218&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53218&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53218&r=mysqlcfg

« previous php.doc.bugs (#5456) next »