ID:               12360
 Comment by:       adult at adult-inc dot biz
 Reported By:      sheep at fearthisclan dot com
 Status:           No Feedback
 Bug Type:         Sockets related
 Operating System: FreeBSD
 PHP Version:      4.3.2
 New Comment:

Hello.
I'm experiencing same problems with PHP 4.3.4 for Win32.

========
| CODE |
========
$socket = fsockopen($ip, $port, &$errno, &$errstr, 5);
stream_set_blocking($socket, FALSE );
stream_set_timeout($socket, 5);
fputs($socket, $request);
$html = "";
while (!feof($socket))
        {
        $html = $html.fgets($socket, 128);
        }
fclose($socket);

==========
| Result |
==========
I got a fatal error after 30 seconds of running. I tried even 600
seconds in max_execution_time and have no luck - still have the same
error. Looks like script hangs up while connecting to non-existent port
on remote host.

PS: Notice that i'm using only IP-addresses to connect, no hostnames!
So the problem not in DNS-resolving.


Previous Comments:
------------------------------------------------------------------------

[2005-01-14 20:40:23] shelby at coolpage dot com

Patching the DNS just eliminates the hanging on DNS.  That doesn't fix
the fact that the timeout isn't working.

This is still broken, see:

http://bugs.php.net/bug.php?id=24867

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

[2004-02-03 07:02:31] johannes at zoomposters dot com

I got it to work now by setting up my own dns server.

It's apparently at the DNS lookup that the code hangs and where the
timeout has no effect.

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

[2004-01-30 02:45:59] johannes at zoomposters dot com

The timeout still doesn't work. The function doesn't hang but the
timeout has no effect at all.

Using:
Redhat 9
http://snaps.php.net/php4-STABLE-latest.tar.gz (2004-01-30)

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

[2004-01-06 20:53:41] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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

[2004-01-01 21:03:59] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/12360

-- 
Edit this bug report at http://bugs.php.net/?id=12360&edit=1

Reply via email to