ID:               21653
 Comment by:       caitlin at meowww dot com
 Reported By:      support at hostcolor dot com
 Status:           No Feedback
 Bug Type:         Sockets related
 Operating System: RedHat 7.2
 PHP Version:      4.3.0
 New Comment:

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.


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

[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 ) );

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

[2003-05-15 00:56:40] davideturner at hotmail dot com

I am receiving the same issue with eNoms app. Worked in 4.2.3 now
receive that error with 4.3.1.

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

[2003-05-09 07:25:56] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



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

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