Bug #48628 mysql crashes apache on mysql_close call
Submitted: 9 Nov 2009 9:03 Modified: 4 Mar 2010 8:56
Reporter: Ron Gerrits Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Windows Severity:S2 (Serious)
Version:5.1.36 OS:Windows (Windows Server Standard 2008)
Assigned to: CPU Architecture:Any

[9 Nov 2009 9:03] Ron Gerrits
Description:
This error occurs:

Faulting application httpd.exe, version 2.2.11.0, time stamp 0x493f5d44, faulting module php_mysql.dll, version 5.3.0.0, time stamp 0x4a492311, exception code 0xc0000005, fault offset 0x00002072, process id 0xec, application start time 0x01ca611861f88837.

How to repeat:
Xeon E5345 2.33Ghz
Windows Server Standard 2008
Wamp 2.0i
 apache 2.2.11
 mysql 5.1.36
 php 5.3.0
  xcache 1.3.0

Database has only MyIsam tables.

Code:

  include("../config/config.php");
  $id = $_GET['id'];
  $id = intval($id);
  if($id === 1 || $id === 0)
  	exit("Foutieve invoer");
  
  mysql_connect($host, $user, $pass);
  mysql_select_db($db);  
  mysql_close();
  
exit('okk');
[9 Nov 2009 9:03] Ron Gerrits
Mysql ini

Attachment: mysql.ini (application/octet-stream, text), 5.18 KiB.

[9 Nov 2009 9:04] Ron Gerrits
Mysql config part in php.ini

Attachment: php-ini-mysql-part.txt (text/plain), 4.43 KiB.

[9 Nov 2009 9:11] Ron Gerrits
Commenting the mysql_close part stops the script from crashing httpd.exe
[9 Nov 2009 12:14] MySQL Verification Team
Thank you for the bug report. Why do you think that behavior is MySQL bug?. Please try latest Apache release or open a bug for them. Thanks in advance.
[10 Nov 2009 9:41] Ron Gerrits
I thought it was a MySQL bug because the faulting module is php_mysql.dll... Or am I wrong with that?
[4 Feb 2010 8:56] Sveta Smirnova
Thank you for the feedback.

> I thought it was a MySQL bug because the faulting module is php_mysql.dll... Or am I wrong
with that?

This can be both MySQL and PHP bug.

But this problem can be fixed in PHP 5.3.1. Please try with this version in your environment to be sure.
[5 Mar 2010 0:00] Bugs System
No feedback was provided for this bug for over a month, 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".