Re: Undefined pg_prepare() in 5.6.1
| From: | Chris | Date: | Wed, 01 Nov 2006 02:41:42 +0000 |
| Subject: | Re: Undefined pg_prepare() in 5.6.1 | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-42627@lists.php.net to get a copy of this message | ||
Steve Mathias wrote:
<snipped> Might need to ask the -installs list (the -general one *may* have an idea but the installs list would be better). Looks like the stuff added after 5.1.0rc1 isn't showing up (pg_query_params isn't there either). -- Postgresql & php tutorials http://www.designmagick.com/Chris> Steve Mathias wrote:"Chris" == Chris <dmagick@gmail.com> writes:Chris> Well there is no php 5.6.1 ;) there is a 5.1.6 though and it Chris> should work there. Ooops. Dyslexia sucks. Indeed, I am using 5.1.6 Chris> What shows up if you do a simple: Chris> <?php print_r(get_extension_funcs("pgsql")); ?> An array of function names, not including pg_prepare() ;-(Hello, The following code: <?php // Connect to a database named "mary" $dbconn = pg_connect("host=localhost port=5432 dbname=test user=test password=test"); if(!$dbconn) { echo "Unable to connect to test database\n"; echo pg_last_errror($dbconn); exit; } $result = pg_prepare($dbconn, "my_query", 'SELECT * FROM users WHERE username = $1'); ... ?> gives me this in the apache log: [Tue Oct 31 15:11:42 2006] [error] [client xx.xxx.xxx.x] PHP Fatal error: Call to undefined function pg_prepare() in /usr/local/apache/htdocs/php/dbtest.php on line 10 Other than this, PHP and non-prepare related pg_* functions work fine. php_info() reports that it sees version 8.0.3 of libpq. I've done a fresh compile and install of apache and PHP. Versions are: