Edit report at http://bugs.php.net/bug.php?id=54021&edit=1

 ID:                 54021
 Updated by:         u...@php.net
 Reported by:        webmaster at racecarstory dot org
 Summary:            incompatiiblity PHP 5.3-mysqli
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            MySQLi related
 Operating System:   windows-linux
 PHP Version:        5.3.5
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2011-02-14 21:06:13] 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



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54021&edit=1

Reply via email to