#48934 [Opn->Fbk]: mysqli::real_escape_string causes Apache to crash
| From: | jani@php.net | Date: | Tue, 21 Jul 2009 23:18:43 +0000 |
| Subject: | #48934 [Opn->Fbk]: mysqli::real_escape_string causes Apache to crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140043@lists.php.net to get a copy of this message | ||
ID: 48934
Updated by: jani@php.net
Reported By: volumnet at olympus dot ru
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: Windows XP SP3
PHP Version: 5.3.0
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2009-07-15 20:06:08] volumnet at olympus dot ru
Description:
------------
MySQLi function real_escape_string causes an internal server error
I'm using:
- VC6 x86 PHP 5.3.0 Windows binary (the problem there is both on thread
safe and non thread safe versions) with MySQLi extension support
- Apache 2.2.10
- MySQL 6.0.7 alpha
Reproduce code:
---------------
<?php
$SQL = new mysqli('localhost', 'root', 'password',
'database');
echo $SQL->real_escape_string('aaa');
?>
or
<?php
$SQL = mysqli_connect('localhost', 'root', 'password',
'database');
echo mysqli_real_escape_string($SQL, 'aaa');
?>
Expected result:
----------------
the code expected to return the string "aaa" like in PHP 5.2.x
Actual result:
--------------
while executing it causes Error 500 (Internal Server Error), with
"Premature end of script headers: php-cgi.exe" entry in Apache error
log.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48934&edit=1