ID: 42467
Updated by: [EMAIL PROTECTED]
Reported By: daniel dot buschke at nextiraone dot de
-Status: Open
+Status: Feedback
Bug Type: Streams related
Operating System: Linux
PHP Version: 5CVS-2007-08-29 (snap)
New Comment:
Try this (timeout included) instead:
<?php
$sock = fsockopen('1.2.3.4', 99, $errno, $errstr, 30);
?>
Previous Comments:
------------------------------------------------------------------------
[2007-08-29 11:05:24] daniel dot buschke at nextiraone dot de
<?php
$sock = fsockopen('69.147.83.196', 80);
?>
This one trys to connect to an IP of bugs.php.net. Remember that I run
this script with socksifiy in front:
socksify php -f socksify.php
I'm sure it is not easy for you to reproduce this bug. So here is the
whole story:
I want to connect from Server A (lan) to a Server B (internet). Server
A is behind a firewall which drops allmost everything. So if I want to
connect to the internet I have to use SOCKS5. Therefore I have to use
socksify.
socks_create and socks_connect are working fine! So this is not a
problem of socksify. But I can not use socks because I want to use
ssh2_* buildins which are using the same core functions as fsockopen and
which result in same problem.
------------------------------------------------------------------------
[2007-08-29 09:51:18] [EMAIL PROTECTED]
I can not reproduce with that one liner. It simply hangs.
Obviously you have some bigger script to test with?
------------------------------------------------------------------------
[2007-08-29 09:30:01] daniel dot buschke at nextiraone dot de
Description:
------------
When trying to connect to a host via fsockopen and socksify (see dante)
I get following:
PHP Warning: fsockopen(): unable to connect to 1.2.3.4:99 (Operation
now in progress) in /socksify.php on line 15
But "Operation now in progress" is not an error which tolds that
connect fails.
socket_create and socket_connect are working fine.
seems like #39803 but has different version. Patch of #38568 did not
work
Reproduce code:
---------------
<?php
$sock = fsockopen('1.2.3.4', 99);
?>
Expected result:
----------------
$sock should be an handle which is usable with fread or sth like this
$sock !== FALSE
Actual result:
--------------
PHP Warning: fsockopen(): unable to connect to 1.2.3.4:99 (Operation
now in progress) in /socksify.php on line 15
$sock === FALSE
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42467&edit=1