From: nyang_haggai at yahoo dot com
Operating system: Fedora Core 5
PHP version: 5.2.4
PHP Bug Type: MySQL related
Bug description: mysql_data_seek error bug...
Description:
------------
I'm using PHP 5.1.6 on a production server with a LAMP setup, and I do
code PHP on it remotely every day.
-- can't upgrade at the moment to 5.2.4 - would take people
offline...sorry! Maybe later at night :)
No changes were made to php.ini, except for display_errors = On
No changes to the default mysqld config
I stumbled upon the bug with the mysql_data_seek() function - in short the
problem is that if I spell it as mysql_daat_seek() instead (with the
relevant args), no error is displayed. The page just displays normally - as
if I had commented out the line.
It's trivial to me, but I guess it might give someone debug nightmares if
he/she has several thousands of lines of code, IMHO :)
Reproduce code:
---------------
$result_prepaidcards = mysql_query("SELECT * FROM atrium.prepaidcards
WHERE vendorid = '".$row_vendors['id']."';");
if(mysql_num_rows($result_prepaidcards) > 0)
{
for($i = 0; $i < mysql_num_rows($result_prepaidcards); $i++)
{
mysql_daat_seek($result_prepaidcards,$i);
$row_prepaidcards = mysql_fetch_assoc($result_prepaidcards);
// more code here...
}
}
Expected result:
----------------
I should see a syntax error line for the erroneous mysql_daat_seek()
line...
Actual result:
--------------
The page displays just as usual, NO errors raised! Seems a problem with
the syntax checker, or am I wrong?
--
Edit bug report at http://bugs.php.net/?id=42607&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42607&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42607&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42607&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42607&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42607&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42607&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42607&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42607&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42607&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42607&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42607&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42607&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42607&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42607&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42607&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42607&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42607&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42607&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42607&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42607&r=mysqlcfg