#21653 [Com]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed

From: Date: Thu, 15 May 2003 06:02:18 +0000
Subject: #21653 [Com]: Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39685@lists.php.net to get a copy of this message
 ID:               21653
 Comment by:       davideturner at hotmail 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:

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


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

[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] sniper@php.net

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.



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

[2003-05-05 13:39:43] laudanp at yahoo dot com

My issue still hasn't been resolved because we still haven't traveled
down your recommended path.  Someone at my provider is looking into
this for me.

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

[2003-04-28 06:29:00] wez@php.net

Also, this item from the NEWS file is also relevant:
- Added php.ini option "default_socket_timeout" to set the
  timeout limit for PHP network streams.
 (kalowsky, ilia@prohost.org, Wez)

The default value is 60 seconds (it was introduced to avoid DoS
attacks).

You can set this value from your scripts as well in the ini or
httpd.conf. (see docs for ini_alter).

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

[2003-04-28 06:23:40] wez@php.net

How long does it take to produce the error message?
You are specifying a timeout of 30 seconds; if it takes longer than 30
seconds, PHP will abort the connection attempt, even if it is "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/21653

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



Thread (57 messages)

« previous php.bugs (#39685) next »