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

curl-and-php

Re: curl-and-php Digest, Vol 8, Issue 10

From: Darrell Wu <darrell_wu_at_yahoo.co.nz>
Date: Thu, 20 Apr 2006 22:45:29 +1200 (NZST)

curl-and-php-request_at_cool.haxx.se wrote: Send curl-and-php mailing list submissions to
 curl-and-php_at_cool.haxx.se

To subscribe or unsubscribe via the World Wide Web, visit
 http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
or, via email, send a message with subject or body 'help' to
 curl-and-php-request_at_cool.haxx.se

You can reach the person managing the list at
 curl-and-php-owner_at_cool.haxx.se

When replying, please edit your Subject line so it is more specific
than "Re: Contents of curl-and-php digest..."

Today's Topics:

   1. libcurl 7.12 not responding when using a subdomain (Darrell Wu)
   2. Re: libcurl 7.12 not responding when using a subdomain
      (Daniel Stenberg)

----------------------------------------------------------------------

Message: 1
Date: Thu, 20 Apr 2006 21:28:08 +1200 (NZST)
From: Darrell Wu
Subject: libcurl 7.12 not responding when using a subdomain
To: curl-and-php_at_cool.haxx.se
Message-ID: <20060420092808.68157.qmail_at_web32009.mail.mud.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I've installed apache 1.3.34 and php 4.4.2 with curl 7.12 on Fedora core 3.
And for some reason the web page hangs when excuting my curl statement or nothing is returned to the variable.

I know my code works as i've been running the same code on window XP with libcurl/7.14.0 OpenSSL/0.9.7c zlib/1.2.3.
And i'm unsure why it doesn't work on linux. My code is as follows:

curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$result = curl_exec($ch); // run the whole process
curl_close($ch);

where $url is a subdomain url(I haven't shown the exact url as it requires a apikey)

I've looked in the error logs and around the same time i get the following message
 [notice] caught SIGTERM, shutting down
 [notice] Apache/1.3.34 (Unix) PHP/4.4.2 configured -- resuming normal operations
[notice] Accept mutex: sysvsem (Default: sysvsem)

I've tried running curl from the command line using a url like http://www.domain.com and it works fine, but when i try it with a subdomain the following happens

curl
[3] 3374
[dwu_at_localhost logs]

It places the request in the background and assigns it the pid. After a while i get the message.

curl: (7) couldn't connect to host.

Does anyone have ideas what it could be?

Thanks
Darrell

Send instant messages to your online friends http://au.messenger.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cool.haxx.se/pipermail/curl-and-php/attachments/20060420/0d273f99/attachment.html

------------------------------

Message: 2
Date: Thu, 20 Apr 2006 11:46:00 +0200 (CEST)
From: Daniel Stenberg
Subject: Re: libcurl 7.12 not responding when using a subdomain
To: curl with PHP
Message-ID:

Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 20 Apr 2006, Darrell Wu wrote:

> I've installed apache 1.3.34 and php 4.4.2 with curl 7.12 on Fedora core 3.

...

> I know my code works as i've been running the same code on window XP with
> libcurl/7.14.0 OpenSSL/0.9.7c zlib/1.2.3. And i'm unsure why it doesn't work
> on linux.

Well, 7.12.0 != 7.14.0. You should consider upgrading anyway, since both those
versions contain security flaws and bugs we've fixed.

> I've tried running curl from the command line using a url like
> http://www.domain.com and it works fine, but when i try it with a subdomain
> the following happens
>
> curl
> [3] 3374
> [dwu_at_localhost logs]

What is a "subdomain" in your terms? To me it looks like you're using an '&'
and get the job in the background.

> curl: (7) couldn't connect to host.

Then you've either 1= given it a URL with a host it cannot connect to, or 2)
you're experiencing from a curl bug.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
------------------------------
_______________________________________________
curl-and-php mailing list
curl-and-php_at_cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
End of curl-and-php Digest, Vol 8, Issue 10
*******************************************
>> I've installed apache 1.3.34 and php 4.4.2 with curl 7.12 on Fedora core 3.
>...
>> I know my code works as i've been running the same code on window XP with 
>> libcurl/7.14.0 OpenSSL/0.9.7c zlib/1.2.3. And i'm unsure why it doesn't work 
>> on linux.
>Well, 7.12.0 != 7.14.0. You should consider upgrading anyway, since both >those 
>versions contain security flaws and bugs we've fixed.
OK, I'll look into upgrading them.
>> I've tried running curl from the command line using a url like 
>> http://www.domain.com and it works fine, but when i try it with a subdomain 
>> the following happens
>>
>> curl 
>> [3] 3374
>> [dwu_at_localhost logs]
>What is a "subdomain" in your terms? To me it looks like you're using an '&' 
>and get the job in the background.
Of course you are right i have an & as part of my query string for the url.
I have  
?apikey=<apikey removed>&location=street+address
at the end of the url.  Linux is picking up the & in the middle of my query string and creating a separate task for it.
I guess i have to encode the & for it to work.
Thanks
>> curl: (7) couldn't connect to host.
>Then you've either 1= given it a URL with a host it cannot connect to, or 2) 
>you're experiencing from a curl bug.
Send instant messages to your online friends http://au.messenger.yahoo.com 

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-04-20