mbneto wrote:
Hi,
I am facing a strange problem. I have a script that runs fine in one
server
but simply locks up in another.
I´ve managed to find that when the curl_exec is called the problem appears,
so I decided to use a sample script with the same example found at
ww.php.net and got the same results.
The server-status shows me
SrvPIDAccMCPU SSReqConnChildSlotClientVHostRequest *0-0*201700/2/2*W* 0.00
27800.00.030.03 201.51.28.217myhost.comGET /temp/curl.php HTTP/1.1
I used strace with the pid shown
# strace -p 20170
Process 20170 attached - interrupt to quit
select(1589, [], [], NULL, {0, 685000}) = 0 (Timeout)
gettimeofday({1150235209, 865596}, NULL) = 0
gettimeofday({1150235209, 866753}, NULL) = 0
select(1589, [], [], NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1150235210, 868349}, NULL) = 0
gettimeofday({1150235210, 869048}, NULL) = 0
select(1589, [], [], NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1150235211, 870045}, NULL) = 0
gettimeofday({1150235211, 870598}, NULL) = 0
select(1589, [], [], NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1150235212, 870965}, NULL) = 0
gettimeofday({1150235212, 871669}, NULL) = 0
select(1589, [], [], NULL, {1, 0}) = 0 (Timeout)
gettimeofday({1150235213, 903386}, NULL) = 0
gettimeofday({1150235213, 930348}, NULL) = 0
But I do not have a clue about this.
The script.
<?php
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.myhost.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
// grab URL and pass it to the browser
curl_exec($ch);
// close curl resource, and free up system resources
curl_close($ch);
?>
You might need to compile php with --with-debug and see what you get
back from an strace then.. the php-internals list would need to see the
debug symbols to work out where it's breaking (and you'll need to talk
to the -internals list).
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php