From: Erwin M. <er...@da...> - 2008-09-01 15:42:45
|
Hi, [Posted to John Lim and ado...@li...] I have been using ADODB for many projects, but I think I hitted on a bug. I Googled a little around, but only found the same question, no solution. I'll try to summarize it as short as possible: Working on: erwin@darwine-php5:~$ php -version PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies Running on Apache2 , and I use Postgres 8.1 I use your adodb5 package for all DB access. The project at hand uses a custum errorhandler. I founded I keep getting errors on simple, and correct, SQL statements (the SQL runs just fine when directly copy/pasted to psql). For example (from my script) $SQL_rights = "SELECT rightid, rightdesc_short, right_comment FROM tblrights order by rightid;"; $RS_rights = $connection->getAll($SQL_rights); results in an error. Here are the details (from my own errorhandler, so they might be formatted differently) The error has a backtrace: date: 2008-09-01 17:19:58 [12] type: E_WARNING [2] error: pg_fetch_array() [function.pg-fetch-array]: Unable to jump to row 0 on PostgreSQL result index 15 /srv/hosting/www.mywebsite.nl/www/includes/adodb5/drivers/adodb-postgres64.inc.php (line 988)#0 errorHandler(2, pg_fetch_array() [function.pg-fetch-array]: Unable to jump to row 0 on PostgreSQL result index 15, /srv/hosting/www.mywebsite.nl/www/includes/adodb5/drivers/adodb-postgres64.inc.php, 988, Array ()) #1 pg_fetch_array(Resource id #15, 0, 1) called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/drivers/adodb-postgres64.inc.php:988] #2 ADORecordSet_postgres64->_fetch() called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/adodb.inc.php:2912] #3 ADORecordSet->Init() called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/adodb.inc.php:1053] #4 ADOConnection->_Execute(SELECT rightid,rightdesc_short,right_comment FROM tblrights order by rightid;, ) called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/adodb.inc.php:1011] #5 ADOConnection->Execute(SELECT rightid,rightdesc_short,right_comment FROM tblrights order by rightid;, ) called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/adodb.inc.php:1528] #6 ADOConnection->GetArray(SELECT rightid,rightdesc_short,right_comment FROM tblrights order by rightid;, ) called at [/srv/hosting/www.mywebsite.nl/www/includes/adodb5/adodb.inc.php:1379] #7 ADOConnection->GetAll(SELECT rightid,rightdesc_short,right_comment FROM tblrights order by rightid;) called at [/srv/hosting/www.mywebsite.nl/www/admin/admin_rights.php:31] The last line in the error (/srv/hosting/www.mywebsite.nl/www/admin/admin_rights.php:31) points indeed to: $RS_rights = $connection->getAll($SQL_rights); I have no clue what this error means or why I get it. The strange thing is: If I DISABLE my errorhandler via restore_error_handler() above my script, I do not get this WARNING anymore. But in my php.ini I have error_reporting = E_ALL Which came as a surprise to me. Why is this warning only showing up when I use my own errorhandler, and NOT when I use the default PHP5 buildin errorhandler? Thanks for your time. If I need to provide more information, just let me know. Regards, Erwin Moller |