Bug #14383 Updated: using postgres with DBA causes DBA not to be able to find any keys.
| From: | yohgaki@php.net | Date: | Wed, 12 Dec 2001 08:42:32 +0000 |
| Subject: | Bug #14383 Updated: using postgres with DBA causes DBA not to be able to find any keys. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73228@lists.php.net to get a copy of this message | ||
ID: 14383
Updated by: yohgaki
Reported By: gclarkii@vsservices.com
Status: Open
Bug Type: DBM/DBA related
Operating System: FreeBSD 4.4-STABLE
PHP Version: 4.0.6
New Comment:
Just trying to clarify.
If you don't use postgresql functions *before* dba functions, your script works as expected?
Could you try it with 4.1.0 to see it helps?
--
Yasuo
Previous Comments:
------------------------------------------------------------------------
[2001-12-07 14:37:40] gclarkii@vsservices.com
Hello,
If I use postgres first within a PHP script then DBA can not find any keys.
It will return the error:
"Warning: Unable to find DBA identifier 1 in /www/sites/Test/htdocs/dbafuncs.php on line
31"
If I do not use a pg_connect, then it works perfectly.
Here is a short script that triggers it.
--SNIP--
$dbh = pg_connect("dbname=helpme user=helpme");
if (!$dbh) {
die ("Could not connect to the server");
}
pg_close($dbh);
$dbalocation = "/www/sites/Test/xxadmindb";
echo "$dbalocation<br><br>";
$dbm = dba_open("$dbalocation", "r", "ndbm") || die ("Could not
open file");
if(!$dbm) {
die ("no handle");
}
$key = dba_firstkey($dbm);
if(!$key) {
echo "<br><br>Error with retreiving Key<br><br>\n";
}
$info[$key] = dba_fetch($key, $dbm);
while($key != false) {
$key = dba_nextkey($dbm);
if(!$key) { break; }
$info[$key] = dba_fetch($key, $dbm);
}
dba_close($dbm);
--SNIP--
The dba_open works just fine and returns a handle, however anything that needs a key will fail with
the above error.
GB Clark
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14383&edit=1