ID: 45468
Comment by: jan at bolmeson dot se
Reported By: michael dot kofler at gmx dot com
Status: Open
Bug Type: MySQLi related
Operating System: *
PHP Version: 5.3CVS-2008-07-09 (snap)
New Comment:
I have a similar problem with
MySQL 5.1.25-rc-win32
PHP 5.2.6
The following code crashes Apache with reference to mysqli.
<?php
$mysqli = new mysqli("localhost", "root", "password", "database");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$query = "SELECT * FROM companies LIMIT 10";
$result = $mysqli->query($query);
var_dump( $mysqli );
?>
A similar error is reported in:
http://www.apachelounge.com/forum/viewtopic.php?p=11311
Best regards,
//jan
Previous Comments:
------------------------------------------------------------------------
[2008-07-09 13:51:38] michael dot kofler at gmx dot com
Description:
------------
neither mysql nor mysqli work at all
the problem is caused by mysqlnd (if I compile without mysqlnd, it
works)
testing environment:
1) Linux with MySQL 5.1.25 and PHP 5.3 snapshot compiled with
--with-mysql=mysqlnd --with-mysqli=mysqlnd
2) Windows Vista with MySQL 5.1.25 and PHP 5.3 snapshot
in both cases, phpinfo() shows mysql, mysqli and mysqlnd information;
mysql and mysqli use mysqlnd
Reproduce code:
---------------
$mysqli = new mysqli("localhost", "root", "***", "mydatabase");
Expected result:
----------------
a valid mysqli object (code works in Windows with PHP 5.2.6 and in
Linux when PHP is compiled without mysqlnd)
Actual result:
--------------
Windows: blank page, no error at all
Linux:
Warning: mysqli::mysqli() [mysqli.mysqli]: [2002] No such file or
directory ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45468&edit=1