Zend_Http_Client timeout on production server

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_Http_Client timeout on production server

umpirsky
Hi.


This works perfect in my test environment (Windows), but on production (FreeBSD) I have this error:


2010-04-09T08:14:48+02:00 ERR (3): exception 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect to tcp://www.xxx.net:80. Error #60: Operation timed out' in /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
Stack trace:
#0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975): Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
...

similar error I get with curl adapter:

2010-04-09T08:54:07+02:00 ERR (3): exception 'Zend_Http_Client_Exception' with message 'Error in cURL request: connect() timed out!' in /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
Stack trace:
#0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989): Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http), '1.1', Array, '')
Test and production servers are in different countries, maybe site is not accessible from production?
Regards,
Saša Stamenković
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

Mario Guenterberg-4
On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:

> Hi.
>
> I'm openin url like this with Zend_Http_Client
> http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
> .
>
> This works perfect in my test environment (Windows), but on production
> (FreeBSD) I have this error:
>
>
> 2010-04-09T08:14:48+02:00 ERR (3): exception
> 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
> to tcp://www.xxx.net:80. Error #60: Operation timed out' in
> /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
> Stack trace:
> #0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
> Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>
> ...
>
> similar error I get with curl adapter:
>
>
> 2010-04-09T08:54:07+02:00 ERR (3): exception
> 'Zend_Http_Client_Exception' with message 'Error in cURL request:
> connect() timed out!' in
> /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
> Stack trace:
> #0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
> Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
> '1.1', Array, '')
>
> Test and production servers are in different countries, maybe site is
> not accessible from production?
>
> Regards,
> Saša Stamenković
It looks like your firewall will not allowing outgoing connections.
Your code seems okay, but you have no connection to the servers
outside.

Greetings
Mario

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
r+++ y++++
------END GEEK CODE BLOCK------

attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

umpirsky
When I change URL to any other site, it works, but for this particular one, it fails.

I don't have privileges to ping since I'm on shared hosting without SSH.

Regards,
Saša Stamenković


On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg <[hidden email]> wrote:
On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
> Hi.
>
> I'm openin url like this with Zend_Http_Client
> http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
> .
>
> This works perfect in my test environment (Windows), but on production
> (FreeBSD) I have this error:
>
>
> 2010-04-09T08:14:48+02:00 ERR (3): exception
> 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
> to tcp://www.xxx.net:80. Error #60: Operation timed out' in
> /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
> Stack trace:
> #0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
> Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>
> ...
>
> similar error I get with curl adapter:
>
>
> 2010-04-09T08:54:07+02:00 ERR (3): exception
> 'Zend_Http_Client_Exception' with message 'Error in cURL request:
> connect() timed out!' in
> /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
> Stack trace:
> #0 /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
> Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
> '1.1', Array, '')
>
> Test and production servers are in different countries, maybe site is
> not accessible from production?
>
> Regards,
> Saša Stamenković

It looks like your firewall will not allowing outgoing connections.
Your code seems okay, but you have no connection to the servers
outside.

Greetings
Mario

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
r+++ y++++
------END GEEK CODE BLOCK------

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

till
To test a connection, you can always try:
<?php var_dump(fopen('http://url', 'r'));

To test DNS:
<?php
var_dump(gethostbyname('example.org'));

... the first shouldn't be false, the second should be the IP of the
domain. Most likely the same as if you run this code from "home".

Till

On Fri, Apr 9, 2010 at 2:03 PM, Саша Стаменковић <[hidden email]> wrote:

> When I change URL to any other site, it works, but for this particular one,
> it fails.
> I don't have privileges to ping since I'm on shared hosting without SSH.
>
> Regards,
> Saša Stamenković
>
>
> On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg
> <[hidden email]> wrote:
>>
>> On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
>> > Hi.
>> >
>> > I'm openin url like this with Zend_Http_Client
>> >
>> > http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
>> > .
>> >
>> > This works perfect in my test environment (Windows), but on production
>> > (FreeBSD) I have this error:
>> >
>> >
>> > 2010-04-09T08:14:48+02:00 ERR (3): exception
>> > 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
>> > to tcp://www.xxx.net:80. Error #60: Operation timed out' in
>> >
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
>> > Stack trace:
>> > #0
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
>> > Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>> >
>> > ...
>> >
>> > similar error I get with curl adapter:
>> >
>> >
>> > 2010-04-09T08:54:07+02:00 ERR (3): exception
>> > 'Zend_Http_Client_Exception' with message 'Error in cURL request:
>> > connect() timed out!' in
>> >
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
>> > Stack trace:
>> > #0
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
>> > Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
>> > '1.1', Array, '')
>> >
>> > Test and production servers are in different countries, maybe site is
>> > not accessible from production?
>> >
>> > Regards,
>> > Saša Stamenković
>>
>> It looks like your firewall will not allowing outgoing connections.
>> Your code seems okay, but you have no connection to the servers
>> outside.
>>
>> Greetings
>> Mario
>>
>> --
>> -----BEGIN GEEK CODE BLOCK-----
>> Version: 3.12
>> GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
>> V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
>> r+++ y++++
>> ------END GEEK CODE BLOCK------
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

umpirsky
First one is false, second one gives IP.

Regards,
Saša Stamenković


On Fri, Apr 9, 2010 at 2:35 PM, till <[hidden email]> wrote:
To test a connection, you can always try:
<?php var_dump(fopen('http://url', 'r'));

To test DNS:
<?php
var_dump(gethostbyname('example.org'));

... the first shouldn't be false, the second should be the IP of the
domain. Most likely the same as if you run this code from "home".

Till

On Fri, Apr 9, 2010 at 2:03 PM, Саша Стаменковић <[hidden email]> wrote:
> When I change URL to any other site, it works, but for this particular one,
> it fails.
> I don't have privileges to ping since I'm on shared hosting without SSH.
>
> Regards,
> Saša Stamenković
>
>
> On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg
> <[hidden email]> wrote:
>>
>> On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
>> > Hi.
>> >
>> > I'm openin url like this with Zend_Http_Client
>> >
>> > http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
>> > .
>> >
>> > This works perfect in my test environment (Windows), but on production
>> > (FreeBSD) I have this error:
>> >
>> >
>> > 2010-04-09T08:14:48+02:00 ERR (3): exception
>> > 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
>> > to tcp://www.xxx.net:80. Error #60: Operation timed out' in
>> >
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
>> > Stack trace:
>> > #0
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
>> > Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>> >
>> > ...
>> >
>> > similar error I get with curl adapter:
>> >
>> >
>> > 2010-04-09T08:54:07+02:00 ERR (3): exception
>> > 'Zend_Http_Client_Exception' with message 'Error in cURL request:
>> > connect() timed out!' in
>> >
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
>> > Stack trace:
>> > #0
>> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
>> > Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
>> > '1.1', Array, '')
>> >
>> > Test and production servers are in different countries, maybe site is
>> > not accessible from production?
>> >
>> > Regards,
>> > Saša Stamenković
>>
>> It looks like your firewall will not allowing outgoing connections.
>> Your code seems okay, but you have no connection to the servers
>> outside.
>>
>> Greetings
>> Mario
>>
>> --
>> -----BEGIN GEEK CODE BLOCK-----
>> Version: 3.12
>> GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O- M-
>> V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
>> r+++ y++++
>> ------END GEEK CODE BLOCK------
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

till
Ok, great a phpinfo and check for allow_url_open. ;-)

Also, are you sure the other website is "up"?

On Fri, Apr 9, 2010 at 2:38 PM, Саша Стаменковић <[hidden email]> wrote:

> First one is false, second one gives IP.
>
> Regards,
> Saša Stamenković
>
>
> On Fri, Apr 9, 2010 at 2:35 PM, till <[hidden email]> wrote:
>>
>> To test a connection, you can always try:
>> <?php var_dump(fopen('http://url', 'r'));
>>
>> To test DNS:
>> <?php
>> var_dump(gethostbyname('example.org'));
>>
>> ... the first shouldn't be false, the second should be the IP of the
>> domain. Most likely the same as if you run this code from "home".
>>
>> Till
>>
>> On Fri, Apr 9, 2010 at 2:03 PM, Саша Стаменковић <[hidden email]>
>> wrote:
>> > When I change URL to any other site, it works, but for this particular
>> > one,
>> > it fails.
>> > I don't have privileges to ping since I'm on shared hosting without SSH.
>> >
>> > Regards,
>> > Saša Stamenković
>> >
>> >
>> > On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg
>> > <[hidden email]> wrote:
>> >>
>> >> On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
>> >> > Hi.
>> >> >
>> >> > I'm openin url like this with Zend_Http_Client
>> >> >
>> >> >
>> >> > http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
>> >> > .
>> >> >
>> >> > This works perfect in my test environment (Windows), but on
>> >> > production
>> >> > (FreeBSD) I have this error:
>> >> >
>> >> >
>> >> > 2010-04-09T08:14:48+02:00 ERR (3): exception
>> >> > 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
>> >> > to tcp://www.xxx.net:80. Error #60: Operation timed out' in
>> >> >
>> >> >
>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
>> >> > Stack trace:
>> >> > #0
>> >> >
>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
>> >> > Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>> >> >
>> >> > ...
>> >> >
>> >> > similar error I get with curl adapter:
>> >> >
>> >> >
>> >> > 2010-04-09T08:54:07+02:00 ERR (3): exception
>> >> > 'Zend_Http_Client_Exception' with message 'Error in cURL request:
>> >> > connect() timed out!' in
>> >> >
>> >> >
>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
>> >> > Stack trace:
>> >> > #0
>> >> >
>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
>> >> > Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
>> >> > '1.1', Array, '')
>> >> >
>> >> > Test and production servers are in different countries, maybe site is
>> >> > not accessible from production?
>> >> >
>> >> > Regards,
>> >> > Saša Stamenković
>> >>
>> >> It looks like your firewall will not allowing outgoing connections.
>> >> Your code seems okay, but you have no connection to the servers
>> >> outside.
>> >>
>> >> Greetings
>> >> Mario
>> >>
>> >> --
>> >> -----BEGIN GEEK CODE BLOCK-----
>> >> Version: 3.12
>> >> GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O-
>> >> M-
>> >> V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
>> >> r+++ y++++
>> >> ------END GEEK CODE BLOCK------
>> >
>> >
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

till
On Fri, Apr 9, 2010 at 2:47 PM, till <[hidden email]> wrote:
> Ok, great a phpinfo and check for allow_url_open. ;-)

Oops: Ok, great. Create a phpinfo ...

>
> Also, are you sure the other website is "up"?
>
> On Fri, Apr 9, 2010 at 2:38 PM, Саша Стаменковић <[hidden email]> wrote:
>> First one is false, second one gives IP.
>>
>> Regards,
>> Saša Stamenković
>>
>>
>> On Fri, Apr 9, 2010 at 2:35 PM, till <[hidden email]> wrote:
>>>
>>> To test a connection, you can always try:
>>> <?php var_dump(fopen('http://url', 'r'));
>>>
>>> To test DNS:
>>> <?php
>>> var_dump(gethostbyname('example.org'));
>>>
>>> ... the first shouldn't be false, the second should be the IP of the
>>> domain. Most likely the same as if you run this code from "home".
>>>
>>> Till
>>>
>>> On Fri, Apr 9, 2010 at 2:03 PM, Саша Стаменковић <[hidden email]>
>>> wrote:
>>> > When I change URL to any other site, it works, but for this particular
>>> > one,
>>> > it fails.
>>> > I don't have privileges to ping since I'm on shared hosting without SSH.
>>> >
>>> > Regards,
>>> > Saša Stamenković
>>> >
>>> >
>>> > On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg
>>> > <[hidden email]> wrote:
>>> >>
>>> >> On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
>>> >> > Hi.
>>> >> >
>>> >> > I'm openin url like this with Zend_Http_Client
>>> >> >
>>> >> >
>>> >> > http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
>>> >> > .
>>> >> >
>>> >> > This works perfect in my test environment (Windows), but on
>>> >> > production
>>> >> > (FreeBSD) I have this error:
>>> >> >
>>> >> >
>>> >> > 2010-04-09T08:14:48+02:00 ERR (3): exception
>>> >> > 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
>>> >> > to tcp://www.xxx.net:80. Error #60: Operation timed out' in
>>> >> >
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
>>> >> > Stack trace:
>>> >> > #0
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
>>> >> > Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>>> >> >
>>> >> > ...
>>> >> >
>>> >> > similar error I get with curl adapter:
>>> >> >
>>> >> >
>>> >> > 2010-04-09T08:54:07+02:00 ERR (3): exception
>>> >> > 'Zend_Http_Client_Exception' with message 'Error in cURL request:
>>> >> > connect() timed out!' in
>>> >> >
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
>>> >> > Stack trace:
>>> >> > #0
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
>>> >> > Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
>>> >> > '1.1', Array, '')
>>> >> >
>>> >> > Test and production servers are in different countries, maybe site is
>>> >> > not accessible from production?
>>> >> >
>>> >> > Regards,
>>> >> > Saša Stamenković
>>> >>
>>> >> It looks like your firewall will not allowing outgoing connections.
>>> >> Your code seems okay, but you have no connection to the servers
>>> >> outside.
>>> >>
>>> >> Greetings
>>> >> Mario
>>> >>
>>> >> --
>>> >> -----BEGIN GEEK CODE BLOCK-----
>>> >> Version: 3.12
>>> >> GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O-
>>> >> M-
>>> >> V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
>>> >> r+++ y++++
>>> >> ------END GEEK CODE BLOCK------
>>> >
>>> >
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

umpirsky
http://www.screencast.com/users/umpirsky/folders/Jing/media/0102059b-8c12-46ff-83e0-cb6b6159c63b

but for any other URL it works fine.

Regards,
Saša Stamenković


On Fri, Apr 9, 2010 at 2:48 PM, till <[hidden email]> wrote:
On Fri, Apr 9, 2010 at 2:47 PM, till <[hidden email]> wrote:
> Ok, great a phpinfo and check for allow_url_open. ;-)

Oops: Ok, great. Create a phpinfo ...
>
> Also, are you sure the other website is "up"?
>
> On Fri, Apr 9, 2010 at 2:38 PM, Саша Стаменковић <[hidden email]> wrote:
>> First one is false, second one gives IP.
>>
>> Regards,
>> Saša Stamenković
>>
>>
>> On Fri, Apr 9, 2010 at 2:35 PM, till <[hidden email]> wrote:
>>>
>>> To test a connection, you can always try:
>>> <?php var_dump(fopen('http://url', 'r'));
>>>
>>> To test DNS:
>>> <?php
>>> var_dump(gethostbyname('example.org'));
>>>
>>> ... the first shouldn't be false, the second should be the IP of the
>>> domain. Most likely the same as if you run this code from "home".
>>>
>>> Till
>>>
>>> On Fri, Apr 9, 2010 at 2:03 PM, Саша Стаменковић <[hidden email]>
>>> wrote:
>>> > When I change URL to any other site, it works, but for this particular
>>> > one,
>>> > it fails.
>>> > I don't have privileges to ping since I'm on shared hosting without SSH.
>>> >
>>> > Regards,
>>> > Saša Stamenković
>>> >
>>> >
>>> > On Fri, Apr 9, 2010 at 2:01 PM, Mario Guenterberg
>>> > <[hidden email]> wrote:
>>> >>
>>> >> On Fr, Apr 09, 2010 at 10:11:00 +0200, Саша Стаменковић wrote:
>>> >> > Hi.
>>> >> >
>>> >> > I'm openin url like this with Zend_Http_Client
>>> >> >
>>> >> >
>>> >> > http://www.xxx.net/index.php?option=com_autoexp&page=show_search&mode=1&Itemid=54
>>> >> > .
>>> >> >
>>> >> > This works perfect in my test environment (Windows), but on
>>> >> > production
>>> >> > (FreeBSD) I have this error:
>>> >> >
>>> >> >
>>> >> > 2010-04-09T08:14:48+02:00 ERR (3): exception
>>> >> > 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect
>>> >> > to tcp://www.xxx.net:80. Error #60: Operation timed out' in
>>> >> >
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Socket.php:235
>>> >> > Stack trace:
>>> >> > #0
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(975):
>>> >> > Zend_Http_Client_Adapter_Socket->connect('www.xxx.n...', 80, false)
>>> >> >
>>> >> > ...
>>> >> >
>>> >> > similar error I get with curl adapter:
>>> >> >
>>> >> >
>>> >> > 2010-04-09T08:54:07+02:00 ERR (3): exception
>>> >> > 'Zend_Http_Client_Exception' with message 'Error in cURL request:
>>> >> > connect() timed out!' in
>>> >> >
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client/Adapter/Curl.php:417
>>> >> > Stack trace:
>>> >> > #0
>>> >> >
>>> >> > /www/webvol4/m9/4zjhf3no4hjbso9/automobi.li/library/Zend/Http/Client.php(989):
>>> >> > Zend_Http_Client_Adapter_Curl->write('GET', Object(Zend_Uri_Http),
>>> >> > '1.1', Array, '')
>>> >> >
>>> >> > Test and production servers are in different countries, maybe site is
>>> >> > not accessible from production?
>>> >> >
>>> >> > Regards,
>>> >> > Saša Stamenković
>>> >>
>>> >> It looks like your firewall will not allowing outgoing connections.
>>> >> Your code seems okay, but you have no connection to the servers
>>> >> outside.
>>> >>
>>> >> Greetings
>>> >> Mario
>>> >>
>>> >> --
>>> >> -----BEGIN GEEK CODE BLOCK-----
>>> >> Version: 3.12
>>> >> GCS/CM d- s++: a+ C++++>$ UBL*++++$ P++ L+++ E--- W+++ N+ o-- K- w O-
>>> >> M-
>>> >> V-- PS++ PE++ Y PGP+++ t--- 5 X++++ R++ tv- b+++ DI D++++  G++ e* h----
>>> >> r+++ y++++
>>> >> ------END GEEK CODE BLOCK------
>>> >
>>> >
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

Mario Guenterberg-3
On Fr, Apr 09, 2010 at 02:54:41 +0200, Саша Стаменковић wrote:
> http://www.screencast.com/users/umpirsky/folders/Jing/media/0102059b-8c12-46ff-83e0-cb6b6159c63b
>
> but for any other URL it works fine.
>
> Regards,
> Saša Stamenković

Try to set php_value allow_url_fopen 1 in your .htaccess file.
If the provider has strong security settings, this will end in an
error message.

Greetings
Mario

--
Poolbyte - Mario Guenterberg
Tel:  033876-21 966
http://www.poolbyte.de

Inhaber: Mario Guenterberg
Garlitzer Dorfstr. 18
14715 Märkisch Luch

attachment0 (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

umpirsky
Tried 

phpSettings.allow_url_fopen = 1

in application.ini

also tried 

ini_set ('allow_url_fopen', 1);
and

ini_set ('allow_url_fopen', 'On');

But it stays Off all the time, local and master value.

???

Regards,
Saša Stamenković


On Fri, Apr 9, 2010 at 3:12 PM, Mario Guenterberg <[hidden email]> wrote:
On Fr, Apr 09, 2010 at 02:54:41 +0200, Саша Стаменковић wrote:
> http://www.screencast.com/users/umpirsky/folders/Jing/media/0102059b-8c12-46ff-83e0-cb6b6159c63b
>
> but for any other URL it works fine.
>
> Regards,
> Saša Stamenković

Try to set php_value allow_url_fopen 1 in your .htaccess file.
If the provider has strong security settings, this will end in an
error message.

Greetings
Mario

--
Poolbyte - Mario Guenterberg
Tel:  033876-21 966
http://www.poolbyte.de

Inhaber: Mario Guenterberg
Garlitzer Dorfstr. 18
14715 Märkisch Luch

Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

till
Maybe you are not allowed to adjust them. :)

Or try it through .htaccess.

On Fri, Apr 9, 2010 at 3:27 PM, Саша Стаменковић <[hidden email]> wrote:

> Tried
> phpSettings.allow_url_fopen = 1
> in application.ini
> also tried
> ini_set ('allow_url_fopen', 1);
> and
> ini_set ('allow_url_fopen', 'On');
> But it stays Off all the time, local and master value.
> ???
> Regards,
> Saša Stamenković
>
>
> On Fri, Apr 9, 2010 at 3:12 PM, Mario Guenterberg <[hidden email]> wrote:
>>
>> On Fr, Apr 09, 2010 at 02:54:41 +0200, Саша Стаменковић wrote:
>> >
>> > http://www.screencast.com/users/umpirsky/folders/Jing/media/0102059b-8c12-46ff-83e0-cb6b6159c63b
>> >
>> > but for any other URL it works fine.
>> >
>> > Regards,
>> > Saša Stamenković
>>
>> Try to set php_value allow_url_fopen 1 in your .htaccess file.
>> If the provider has strong security settings, this will end in an
>> error message.
>>
>> Greetings
>> Mario
>>
>> --
>> Poolbyte - Mario Guenterberg
>> Tel:  033876-21 966
>> http://www.poolbyte.de
>>
>> Inhaber: Mario Guenterberg
>> Garlitzer Dorfstr. 18
>> 14715 Märkisch Luch
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Http_Client timeout on production server

Mario Guenterberg-4
In reply to this post by umpirsky
On Fr, Apr 09, 2010 at 03:27:19 +0200, Саша Стаменковић wrote:

> Tried
>
> phpSettings.allow_url_fopen = 1
>
> in application.ini
>
> also tried
>
> ini_set ('allow_url_fopen', 1);
> and
>
> ini_set ('allow_url_fopen', 'On');
>
> But it stays Off all the time, local and master value.
>
> ???
That's right if your provider have strong security settings and
disallow changes via .htaccess or similiar for the allow_url_XXXX
directives.

That you can establish connections for other sites is a miracle.
The phpinfo() says that allow_url_XXX paramters are ALL off.

Can you modify your .htaccess file?

Greetings
Mario

attachment0 (205 bytes) Download Attachment