ID:               21653
 Updated by:       [EMAIL PROTECTED]
 Reported By:      support at hostcolor dot com
-Status:           No Feedback
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: RedHat 7.2
 PHP Version:      4.3.0
 New Comment:

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

For those of you using Linux, if the ECN suggestion does not work for
you, please try the latest stable snapshot as it contains a linux
specific workaround that *might* solve your problem.

If it does, report back here and we can make the workaround a more
portable solution.


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

[2003-06-19 23:22:35] kmaier at jkaugust dot com

We were running into this exact problem and it was driving us nuts.... 
but.... we noticed it happened after a kernel upgrade where ECN was
enabled by default.

Try disabling it with:

echo 0 >/proc/sys/net/ipv4/tcp_ecn

... and see if the errors go away.

More info on ECN is here:   http://gtf.org/garzik/ecn/

-ken

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

[2003-06-19 15:52:31] caitlin at meowww dot com

I just started seeing this bug in code that worked for PHP 4.1.2 (never
saw this error for almost a year of daily use) when my ISP upgraded to
4.3.2.  I am using it in a pop mail reader.  I don't see this error
every time I try to connect to the mail server, just randomly, although
it tends to occur many times in a row if I reload the page.

The code looks like this: 

 $this->Socket = fsockopen($server, $port, $errno, $errstr, 5);
 socket_set_timeout($this->Socket, 5);

Where $port = 110 for a pop mail reader, and $server is the address of
my mail server.

Originally the timeout was set to 30, but I read a post by another user
who eliminated this problem by lowering their timeout.  That didn't
work for me.  Whether the time out was 5 or 30 seconds, the error would
return immediately.

Here's my ISP's system software versions: 

OS: RedHat 7.3
Apache: 1.3.27
Mysql: 3.23.56
Tomcat: 4.1.12
JDK: 1.4.1
PHP: 4.3.2
PERL: 5.6

Thanks for any help in a fix or workaround for this bug, which is
affecting me daily.

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

[2003-06-10 12:08:55] laudanp at yahoo dot com

My current host has not done this whatsoever, we have obtained another
server with another host.  We'll be working on it this week.  On the
new server we see the same exact error as on the current server at
computercops.biz.  So the new server will have the CVS build
installed.

Cross your fingers.  (crossing ours)

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

[2003-06-03 14:37:29] scmvs at cs dot cf dot ac dot uk

I experience the same problem with fsockopen. Is this ever going to be
fixed? (I am using PHP 4.3.2)

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

[2003-05-15 01:02:18] davideturner at hotmail dot com

Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect
failed in /home/xxxxxxxxx/include/EnomInterface_inc.php on line 140

Warning: fsockopen() [function.fsockopen]: unable to connect to
resellertest.enom.com:80 in
/home/xxxxxxxxx/include/EnomInterface_inc.php on line 140

Fatal error: Call to undefined function: strerror() in
/home/xxxxxxxxx/include/EnomInterface_inc.php on line 142



Line 140+
                $address = gethostbyname( $host );
                
                // Create a TCP/IP socket.
                $socket = fsockopen($host,80); 
                if ( !$socket ) {
                        $this->AddError( "socket() failed: " . strerror( $socket ) );

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

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

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

Reply via email to