RE: cURL error number:7 cURL error:Failed to connect to
"Billy Kaye " <[email protected]>
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <[email protected]> |
Hi Guys,
Here is my php script can someone please help understand why it cannot
connect
Test it in your server if you can.
<?php
$usrl = "https://dragon.brainstorm.co.uk:1089/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$usrl) or die("Curl Error URL ");;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1) or die("Curl Error TRANSFER");;
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE) or die("Curl Error SSL");;
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$contents = curl_exec ($ch);
print_r(curl_getinfo($ch));
echo "\n\ncURL error number:" .curl_errno($ch);
echo "\n\ncURL error:" . curl_error($ch);
curl_close ($ch);
echo $contents;
?>
Regards
Billy
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Billy Kaye
Sent: Thursday, April 08, 2010 9:24 AM
To: 'curl with PHP'
Subject: RE: cURL error number:7 cURL error:Failed to connect to
Hi,
Actually I turned off the firewall but still it will not connect when I
connect using
Curl on the command line it work the issue comes when I connect using php.
Regards
Billy
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Deepesh Malviya
Sent: Thursday, April 08, 2010 5:32 AM
To: curl with PHP
Subject: Re: cURL error number:7 cURL error:Failed to connect to
it could be the issue that on the server where it doesnt work doesnt
allow to open an outgoing connection to that port. tip: check the
firewall of that server.
On 4/8/10, Billy Kaye <[email protected]> wrote:
> Hi ,
>
>
>
> I have php ,curl and libcurl installed on most of my servers the problem
is
> it works on some servers and the
>
> Others it doesnot work .
>
> All have the same version of curl and php
>
> I do curl_exec($ch);
>
> then
>
> print_r(curl_getinfo($ch));
>
> echo "\n\ncURL error number:" .curl_errno($ch);
>
> echo "\n\ncURL error:" . curl_error($ch);
>
>
>
> Result is as below
>
>
>
> cURL error number:7 cURL error:Failed to connect to 192.168.24.121:
> Permission denied
>
>
>
> Am trying to connect to https://192.168.24.121:10000/
>
>
>
> Does curl have an issue with ports but how come it works on my other
> servers.
>
> Help will be very much appreciated
>
>
>
>
>
>
>
> Billy
>
>
--
_Deepesh
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php