ID:               26805
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mark dot salisbury at hp dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         Sockets related
 Operating System: hpux
 PHP Version:      4.3.4
 New Comment:

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.




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

[2004-01-06 04:37:33] [EMAIL PROTECTED]

Sounds like an ipv6 problem; can you try configuring
PHP using --disable-ipv6 and see if that "fixes" the
problem? (either your v6 stack is broken, or it is
misconfigured).

Also, it would be good if you could test a php5 snapshot
with that script (just the CLI version will do), as it has
some code to detect and avoid this problem at runtime.


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

[2004-01-05 20:18:17] mark dot salisbury at hp dot com

Description:
------------
I was using fsockopen in a script, which worked fine until I upgraded
from version 4.2.0 to 4.3.4.  Oddly, I found a workaround for the bug
by changing my code from:

$fp = fsockopen($server_name, $port, $errno, $errstr);

to:

$fp = fsockopen(gethostbyname($server_name), $port, $errno, $errstr);

Reproduce code:
---------------
fsockopen($server_name, $port, $errno, $errstr);

Expected result:
----------------
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:
host nor service provided, or not known in
/local/apache1.3/htdocs/php_includes/http_post.php on line 45 
Warning: fsockopen(): unable to connect to saturn:81 in
/local/apache1.3/htdocs/php_includes/http_post.php on line 45 

(errno=0 and errstr="error 0", I believe)

The reason I believe this is a bug is that:
a) Isn't fsockopen going to do something similiar to gethostbyname() if
you pass a hostname and not an IP address to fsockopen?  Why does it
work when I pass it an IP address and not the host name?  I would
expect gethostbyname to fail also if my problem were external (DNS).
b) everything worked fine until I upgraded PHP today.



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


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

Reply via email to