|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48934 mysqli::real_escape_string causes Apache to crash
Submitted: 2009-07-15 20:06 UTC Modified: 2009-09-23 21:42 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: volumnet at olympus dot ru Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.3.0 OS: Windows XP SP3
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.
Block user comment
Status: Assign to:
Bug Type:
From: volumnet at olympus dot ru
New email:
PHP Version: OS:


 [2009-07-15 20:06 UTC] volumnet at olympus dot ru
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:
$SQL = new mysqli('localhost', 'root', 'password', 'database');
echo $SQL->real_escape_string('aaa');


$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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-21 23:18 UTC]
Please try using this snapshot:
For Windows:

 [2009-07-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-09-23 21:42 UTC]
Win, mysqlnd, MySQL 6.0, escape - smells like

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 13 06:01:30 2024 UTC