You are here: php_network_getaddresses: getaddrinfo failed « PHP Programming Language « IT news, forums, messages
php_network_getaddresses: getaddrinfo failed

Posted by _q_u_a_m_i_s's on 12/04/07 13:30

Hy,
i have a problem with PHP 5.1.6

I have a script containing something like this:
$f=fsockopen("www.site01.com",80,$errNo,$errStr);
var_dump($f);

When accessing this from apache, i get this error:
php_network_getaddresses: getaddrinfo failed.
When running the same scipt from the CLI (php ./dns.php), i get no
error, and i`m able to connect (and read/write) to www.site01.com

I have another script containing something like this:
$f=fsockopen("www.site02.com",80,$errNo,$errStr);
var_dump($f);

This site is available both from apache, and from CLI.

( so i`m able to connect only to certain websites)

This problem appeared about 1 month ago when the dns servers failed to
work, and they were changed(in /etc/resolv.conf). Before this was
done, everything worked fine. The thing i do not understand is why
only certain sites are available from php, but no restrictions apply
when in CLI.

Anybody else had this problem?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация