|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40085 PHP/MySQL connector and Stored Procedure problem
Submitted: 2007-01-10 03:58 UTC Modified: 2007-01-10 07:52 UTC
From: edward_chan at hotmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.0 OS: XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: edward_chan at hotmail dot com
New email:
PHP Version: OS:


 [2007-01-10 03:58 UTC] edward_chan at hotmail dot com
New version of libmysql.dll and php_mysql.dll do not support running more than one stored procedure within the same connection. The second stored procedure will cause the lost of connection. The old version 5.1.2 do not have this kind of problem.

Reproduce code:
mysql_connect($hostname, $db_login, $db_pass, FALSE, 65536) or die("Could not connect: ".mysql_error());
mysql_select_db($database) or die("Could not select database: ".mysql_error());

$result = mysql_query("CALL SelectUsersCount()") or die("Query failed: ".mysql_error());

if (mysql_result($result, 0, 0))
	$result = mysql_query("CALL SelectUsers()") or die("Query failed: ".mysql_error());


Expected result:
Should not lose the connection when executing the second stored procedure within the same connection

Actual result:
Lost connection to MySQL server during query


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-10 06:26 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

mysql extension doesn't support advanced features like prepared statements and stored procedures.

For using these features you have to use mysqli extension.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 03:03:42 2023 UTC