|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41968 PHP CLI slow to exit with CURL + MySQL extensions
Submitted: 2007-07-11 18:00 UTC Modified: 2007-07-12 14:01 UTC
From: osolo at wndtabs dot com Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5.2.3 OS: Windows XP SP2
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: osolo at wndtabs dot com
New email:
PHP Version: OS:


 [2007-07-11 18:00 UTC] osolo at wndtabs dot com
OK, this is a strange one.  If you have CURL and either the php_mysql or  php_pdo_mysql extensions active, then PHP (command line) will hang for about 5 seconds before actually exiting the script.

This is especially problematic in a CGI scenario, because the connection to the browser isn't closed during this delay and it looks like the request isn't complete.

The problem goes away if I comment out the Mysql extensions in my ini file.

Reproduce code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, '');
echo 'done';

Expected result:
Running this from the command line, you would expect PHP to exit right after the word 'done' is printed.

Actual result:
There is about a 5 second delay between the time the word 'done' is printed and PHP returning control to the command line.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-12 13:59 UTC] osolo at wndtabs dot com
The snapshot didn't fix the same problem.
 [2007-07-12 14:01 UTC]
This is a duplicate of #41350 which is currently being worked on, you require the MySQL 5.0.45 libmysqldll which is currently not included in the snapshot.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Apr 18 23:01:25 2021 UTC