ID:               39803
 User updated by:  marcelo at tpn dot com dot br
 Reported By:      marcelo at tpn dot com dot br
-Status:           Bogus
+Status:           Open
 Bug Type:         Sockets related
 Operating System: FreeBSD 5.3
 PHP Version:      4.4.4
 New Comment:

I don't understand.

If worked with CGI but not as an Apache Module, why you don't consider
this a bug?

I believe that if the code is the same, should produce the same result,
else there is a bug.


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

[2006-12-12 14:22:58] [EMAIL PROTECTED]

Both CGI and Apache module share the same code for fsockopen(), so
fsockopen() doesn't depend on the Server API used.

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

[2006-12-12 14:10:09] marcelo at tpn dot com dot br

More details:

Using php-cgi, fsockopen works correctly.

The build date of the PHP (Apache Module) and PHP-CGI is the same.

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

[2006-12-12 12:58:52] marcelo at tpn dot com dot br

Why socket_create() works and fsockopen() doesn't?

If there is some wrong outside PHP, why just fsockopen fails?

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

[2006-12-12 07:32:24] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please consult your system administrator on how to disable the
firewall.

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

[2006-12-12 01:10:21] marcelo at tpn dot com dot br

Description:
------------
The function fsockopen() is always failing and returning -1.

I already tried with differents hostnames and IP address.

I'm using FreeBSD 5.3.

Reproduce code:
---------------
<?php
$fp = fsockopen("www.google.com", 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)\n";
}
?> 

Expected result:
----------------
$fp should be TRUE...

Actual result:
--------------
But...

$fp is returning FALSE
$errno is returning 36
$errstr is returning "Operation now in progress"


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


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

Reply via email to