cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Problem with browser

From: Mark Leewe <mark_at_werk01.de>
Date: Fri, 11 Feb 2005 09:33:13 +0100

Hello,

I'm new in this list, I hope to find some help, because I have a problem
with cURL...

I'm trying to execute a time-expensive process via cURL out of PHP, so that
the user didn't have to wait for his browser until the process finished. I'm
using the following code:

exec ("usr/bin/curl -m 2 \"http://$HTTP_HOST/scan_exe.php?
PHPSESSID=$PHPSESSID\"");

This works fine. The process is running and the browser returns the PHP-site
that started the process correctly. I even tried the PHP-Lib Module, and
that works fine, too:

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "http://$HTTP_HOST/scan_exe.php?
PHPSESSID=$PHPSESSID");
curl_setopt($curl, CURLOPT_TIMEOUT, 2);
curl_exec($curl);
curl_close($curl);

The problem is: When I now try to go to another page, the browser freeze,
until the process is over. The funny thing about it is, that only this
browser freeze, when I open a second browser, I can navigate through the
pages without any problems. It doesn't matter which type of browser I use
(IE, Firefox, ...)

Did someone have same problems? Is there a resolution for it? I would be
really glad about help!

Sorry for my bad english :-)

Mark.
Received on 2005-02-11