php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23429 pfsockopen open a persistent connection only with "localhost"
Submitted: 2003-04-30 09:28 UTC Modified: 2003-04-30 11:08 UTC
From: m dot antonini at inwind dot it Assigned:
Status: Closed Package: Sockets related
PHP Version: 4.3.2RC2 OS: OSF1 V5.1 732 alpha
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: m dot antonini at inwind dot it
New email:
PHP Version: OS:

 

 [2003-04-30 09:28 UTC] m dot antonini at inwind dot it
Hi! When i try to open a socket connection below:

$fd = pfsockopen("semarmx0034",1705);

where semarmx0034 is the unix machine with apache web server ( 1.3.27 ) installed, this is the error message:

Warning: pfsockopen(): php_network_getaddresses: getaddrinfo failed: Name does not resolv to supplied parameters; neither nodename nor servname were passed. in /dwt/LensTools/apache_1.3.24/htdocs/prova.php on line 2

Warning: pfsockopen(): unable to connect to semarmx0034:1705 in /dwt/LensTools/apache_1.3.24/htdocs/prova.php on line 2

if I try this 

$fd = pfsockopen("localhost",1705);

$fd is a valid Resource id and persistent connection works well.

if I try this 

$fd = pfsockopen("134.32.141.42",1705);

this is the output message:

Warning: pfsockopen(): php_network_getaddresses: getaddrinfo failed: Name does not resolv to supplied parameters; neither nodename nor servname were passed. in /dwt/LensTools/apache_1.3.24/htdocs/prova.php on line 2

Warning: pfsockopen(): unable to connect to 134.32.141.42:1705 in /dwt/LensTools/apache_1.3.24/htdocs/prova.php on line 2

why this function works only with "localhost" parameter in php 4.3.2RC2?

I tested this function on my old php version ( 4.0.6 ) compiled on the same machine and works well with IP address
Is it a unix configuration problem?

Regards 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-30 10:48 UTC] wez@php.net
Some systems appear to have problem with ipv6 support.
Could you try reconfiguring using:

  ./configure --disable-ipv6 ...

and let us know if that helps.
 [2003-04-30 11:08 UTC] m dot antonini at inwind dot it
Great......!
Now the function work well!

Thanks for your support.....

Best Regards
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 10:01:26 2024 UTC