ID:               21736
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: Linux (kernel 2.4.18)
 PHP Version:      4.3.0
 New Comment:

leaving marked as feedback until user reports back.


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

[2003-01-19 09:45:10] [EMAIL PROTECTED]

Hi,

We have set default_socket_timeout=20
It changes nothing. 
fsockopen() doesn't respond even after 20 secs.
After 1 minute waiting for a respond, my browser give up.
So I don't have any error message from the script.
Again, it works fine in PHP4.2.x. It responds (positively) in less than
3 secs and the socket is correctly open.
Tonight I will try with
 http://snaps.php.net/php4-STABLE-latest.tar.gz
I will tell you what happens.

Thanks.

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

[2003-01-19 03:53:01] [EMAIL PROTECTED]

I stand by my original comment; you have your max_execution_time set to
30 seconds, while the default_socket_timeout is 60 seconds.
Try setting it to something less than 30 seconds (or even using the
timeout parameter to fsockopen).

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

[2003-01-19 03:48:50] [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

sorry - I just re-read you report (it's early!).
Can you try a stable snapshot?
If it still hangs, can you read the instructions here:
http://bugs.php.net/bugs-generating-backtrace.php
and follow the "If you can't get a core file" section;
when/if php hangs (after approx 1 minute), interrupt the httpd by
pressing CTRL-C and then type "bt full".


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

[2003-01-19 03:44:31] [EMAIL PROTECTED]

And did you read the NEWS for PHP 4.3.0?

"Added php.ini option "default_socket_timeout" to set the
timeout limit for PHP network streams.
(kalowsky, [EMAIL PROTECTED], Wez)"

This setting is documented here:
http://www.php.net/manual/en/ref.filesystem.php

Changing this to a documentation problem as the fsockopen page should
mention this new feature (which helps prevents potential DOS attacks),
and the documentation of the ini setting should be listed in either the
network functions summary or in the new streams section.

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

[2003-01-18 19:45:05] [EMAIL PROTECTED]

Hi,
Thanks for your answer.
You're right, it is not the fsockopen() which times out. It is the
script itself because the fsockopen() never responds.
After 1 minute waiting for a respond, my browser give up.
So I don't have any error message from the script.

Here is some hints:
- the script runs fine on PHP4.2.x but not on PHP4.3.0
- fsockopen("207.46.245.61", 80); works fine on both PHP4.3.0 and
PHP4.2.x
- fsockopen("lb.msnbc.com", 80); also works fine on both PHP4.3.0 and
PHP4.2.x
- if you need, you can find the phpinfo page at this address :
http://w06.httpserveur.net/phpinfo.php

Thans a lot.

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

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/21736

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

Reply via email to