php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54021 incompatiiblity PHP 5.3-mysqli
Submitted: 2011-02-14 21:06 UTC Modified: 2013-02-18 00:34 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: webmaster at racecarstory dot org Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.3.5 OS: windows-linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: webmaster at racecarstory dot org
New email:
PHP Version: OS:

 

 [2011-02-14 21:06 UTC] webmaster at racecarstory dot org
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-09 15:16 UTC] uw@php.net
-Status: Open +Status: Feedback
 [2011-05-09 15:16 UTC] uw@php.net
Please, check if any error message becomes visible if setting PHP to report all errors (http://php.net/manual/en/function.error-reporting.php , http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors). 

Please, also check the syntax of connect_error/connect_errno (http://de2.php.net/manual/en/mysqli.connect-errno.php). Your script could be wrong there.
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 17:01:29 2024 UTC