From: Operating system: windows-linux PHP version: 5.3.5 Package: MySQLi related Bug Type: Bug Bug description:incompatiiblity PHP 5.3-mysqli
Description: ------------ i develop webapps in PHP OOP and mysql using mysqli library. this very simple query SELECT * FROM fornitori ORDER BY ragSociale works ok on localhost on my PC (Windows 7 Pro x64, apache 2.2.17-PHP 5.3.5-MySQL 5.1.55) but on my VPS (centOS 5.5, apache 2.2.16-PHP 5.3.2-MySQL 5.1.48) doesnt'work! in fact i have crerated a PHP function classes to use databases and in some of these i use the following code to check errors: echo $this->message('Query Error: ' . $mysqli->errno . '\nQuery: ' . $sql . '\n\nError: ' . $mysqli->error); while in localhost tehre isn't any error on my VPS i have teh following error: Query Error: Query: SELECT * FROM fornitori ORDER BY ragSociale Error: without any sort of error description. on other web server where i have a site (apache 2.2.16-PHP 5.2.13-MySQL 5.1.51) there isn't any error! so i think: is this a bug of PHP 5.3 using MySQLi ???? Test script: --------------- function arrayRecords($sql) { $mysqli = new mysqli($this->host, $this->user, $this->pass, $this->data); if ($mysqli) { $result = $mysqli->query($sql); if ($result) { if ($result->num_rows) { while ($row = $result->fetch_assoc()) $array[] = $row; } else $array = array(); } else echo $this->message('Query Error: ' . $mysqli->errno . '\nQuery: ' . $sql . '\n\nError: ' . $mysqli->error); } else echo $this->message('DB Connect Error: ' . $mysqli->connect_errno . '\nError: ' . $mysqli->connect_error); //$result->close(); $mysqli->close(); return $array; } // with PHP 5.2 works, with PHP 5.3 error! $rows = $arrayRecords($sql_query); Expected result: ---------------- nothing, it must show a window with the query results -- Edit bug report at http://bugs.php.net/bug.php?id=54021&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54021&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54021&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54021&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54021&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54021&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54021&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54021&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54021&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54021&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54021&r=support Expected behavior: http://bugs.php.net/fix.php?id=54021&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54021&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54021&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54021&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54021&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54021&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54021&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54021&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54021&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54021&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54021&r=mysqlcfg