From: [EMAIL PROTECTED] Operating system: Linux morlupo 2.4.18-14 (redhat PHP version: 4.2.2 PHP Bug Type: DBX related Bug description: bad rows count in the result object for postgresql
Hello, I am using the default php modules with postgresql coming with redhat 8.0. I have a code using the dbx function that work well in mysql. When changing to postgresql (i.e. changing DBX_MYSQL to DBX_PGSQL in function dbx_connect()) I get warnings that I don't get with mysql. Note that those warning are difficult to see: you have to define your own error_handler to see them!!! That's what I do usually on my web sites. In your error handler I have set the following message options: (E_ERROR,E_WARNING,E_PARSE,E_CORE_ERROR,E_CORE_WARNING,E_USER_ERROR, E_USER_WARNING) -------------------- OK, with that set up after making a query that return 3 rows I get the message: ------- pg_fetch_array() unable to jump to row 10 on PostgreSQL result index 4 in /somepath/library_connect.php line 68 ------- this corresponds to the following loop: $query="select * from membership"; $result=dbx_query($socket,$query,DBX_RESULT_ASSOC); $num_rows = $result->rows; for ($i=0;$i<$num_rows;$i++) { list(,$row)=each($result->data); } This type of code works well with the mysql driver. In postgresq it seems it looks for indexes for 0 to 10 included! -- Edit bug report at http://bugs.php.net/?id=22221&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22221&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22221&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22221&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22221&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22221&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22221&r=support Expected behavior: http://bugs.php.net/fix.php?id=22221&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22221&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22221&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22221&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22221&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22221&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22221&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22221&r=gnused