ID:               39803
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marcelo at tpn dot com dot br
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: FreeBSD 5.3
 PHP Version:      4.4.4
 New Comment:

Sure.


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

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

Can I send the account information to [EMAIL PROTECTED] for privacy?

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

[2006-12-13 10:09:48] [EMAIL PROTECTED]

Please provide more information on how to reproduce it or an account on
this machine.

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

[2006-12-12 17:43:15] marcelo at tpn dot com dot br

I'm using PHP 4.4.4, not PHP 5.

network.c has two pieces that uses EINPROGRESS:

if ((n = connect(sockfd, addr, addrlen)) < 0) {
  if (errno != EINPROGRESS) {
    return -1;
  }
}

if (ret == -1 && error == EINPROGRESS) {
  error = 0;
  goto retry_again;
}

Where should I put "if (error == EINPROGRESS) error = 0;" ?

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

[2006-12-12 16:32:18] [EMAIL PROTECTED]

Does the fix from http://bugs.php.net/bug.php?id=38568 work for you?

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

[2006-12-12 16:19:34] marcelo at tpn dot com dot br

Yes, I've disabled my firewall. I'm sure that isn't a firewall
problem.

The problem doesn't depend the hostname or IP address. I got the same
error trying to connect to localhost, 127.0.0.1, 10.0.0.9 (internal
network)

This also didn't work:

<?php
$fp = fsockopen("127.0.0.1", 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)\n";
}
?> 

This also didn't work (connect to an internal server):

<?php
$fp = fsockopen("10.0.0.9", 80, $errno, $errstr, 30);
if (!$fp) {
   echo "$errstr ($errno)\n";
}
?> 

But I can use socket_connect without problems. Example:

<?
$sockHttp = socket_create(AF_INET, SOCK_STREAM, 0);
if (!$sockHttp) { die('socket_create() failed!'); }
      
$resSockHttp = socket_connect($sockHttp, "10.0.0.9", 80);
if (!$resSockHttp) { die('socket_connect() failed!'); }
?>

I also can use "fetch" utility to get data from these servers. I also
wrote a PERL script, and it worked.

I also type in prompt "telnet 127.0.0.1 80", "telnet www.google.com
80", the connection was sucessfull.

Only while I'm using fsockopen I got errors, always error returns 36
and error string returns "Operation now in progress".

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

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

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

Reply via email to