Re: Re: fopen never ends?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul van Brouwershaven wrote:
Nathan Rixham wrote:
I don't think this is a php problem, just load the url up in a browser and you'll see the same, appears to be a misconfigured server at the otherside - probably confused about not being passed a name based "host" header in the request.
I know that my browser is also waiting a long time, but strange that there is no timeout in fopen? My scripts are getting stuck and eventually they will hang my server. (when I start a new job every x minutes)

Perhaps concider moving to fsockopen or stream_socket_client with timeout parameters to solve your issue.

fsockopen has no context and with stream_socket_client I have no timeout but stream_context_get_options is not returning the right data

$options = stream_context_get_options($fp);



Check out the first "Note:" section on this page.

http://us3.php.net/manual/en/function.stream-socket-client.php

First thing it tells you is that you can set a timeout for the connection using stream_set_timeout().

I know this can be done. I am running a PHP daemon that that acts as both a server and a client.

Jim Lucas

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux