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

 ID:                 11058
 Comment by:         zlisiecki at gmail dot com
 Reported by:        pat at mail dot rit dot edu
 Summary:            php_network_getaddresses: getaddrinfo failed
 Status:             Bogus
 Type:               Bug
 Package:            Network related
 Operating System:   OpenBSD 2.6
 PHP Version:        4.0.6
 Block user comment: N
 Private report:     N

 New Comment:

I have the same problem on SuSE, apache with php 5.3.3. I am calling
fsockopen with 

tls://smtp.gmail.com, 465 and for me it seems php possibly considers tls
as wrong

characters in this place and the resolver cannot resolv the address.
Adding a

proper line with an IP of smtp.gmail.com to /etc/hosts appeared to be a
provisoric

solution.


Previous Comments:
------------------------------------------------------------------------
[2011-01-06 13:44:51] bostjan at a2o dot si

I was experiencing the same problem because the $host variable had some
additional spaces at the end. Check with var_dump() and remove invalid
characters if any are found.



b.

------------------------------------------------------------------------
[2010-07-19 12:58:13] office at hermannseib dot com

My solution:

Check whether PHP may read /etc/resolv.conf.

First, do a



  ls -la /etc/resolv.conf



and if it says something like this



-rw-r----- 1 root root <size> <date> /etc/resolv.conf



(i.e, NOT readable to anyone but root and the members of group root,
which normally means a highly elitist bunch :-), 

then issue the following command as root:



  chmod a+r /etc/resolv.conf



This cured the pesky "getaddrinfo failed" for me.

------------------------------------------------------------------------
[2010-06-02 15:53:43] elynets at gmail dot com

Hello,

I`ve got the same problem on my server while tried to execute some of my
scripts.

The only solution that works fine for me is to disable firewall.

When firewall is disabled I get no errors. 

In the firewall settings all traffic allowed on ports 80 and 53.

------------------------------------------------------------------------
[2010-05-26 23:27:26] pipra133 at yahoo dot com

I am having the same problem .. I am using XAMPP 2.5 version ... it did
work for me on the last version ....



I am using the youtube API to receive youtube videos ... 



there is a major change in my case 



Message: Unable to Connect to tcp://gdata.youtube.com:80. Error #0:
php_network_getaddresses: getaddrinfo failed: No such host is known. 



the return says it tries with TCP rather then http , but my actual stack
trace says it is HTTP . 



#0 C:\xampp\php\PEAR\Zend\Gdata.php(221):
Zend_Gdata_App->performHttpRequest('GET', 'http://gdata.yo...', Array,
NULL, NULL, NULL)



Does anyone have a clue what is wrong ???

------------------------------------------------------------------------
[2010-03-25 06:28:07] cha0s at therealcha0s dot net

Still present in 5.3.

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


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/bug.php?id=11058


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

Reply via email to