php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: osolo at wndtabs dot com
New email:
PHP Version: OS:

 

 [2007-07-11 18:00 UTC] osolo at wndtabs dot com
Description:
------------
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:
---------------
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.php.net');
curl_exec($ch);
curl_close($ch);
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.

Patches

Pull Requests

History

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] scottmac@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 19:01:27 2024 UTC