file () [function.file]: php_network_getaddresses: getaddrinfo başarısız oldu: ad çözümlemesi Geçici hatası

4 Cevap php

I ("http://www.otherdomain.com") dosyasından containts olsun zaman aşağıdaki hata var.

file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

The domain server is linux. How to resolve this problem. Please help me.

Teşekkürler,

4 Cevap

Alıntı:

If you're having problems with fopen("url...") but you can run 'host url' in a shell window and get the correct lookup, here's why...

This has had me banging my head against it all day - finally I found the answer buried in the bug reports, but figured it should really be more prominent!

The problem happens when you're on an ADSL line with DHCP (like our office)... When the ADSL modem renews the DHCP lease, you can also switch DNS servers, which confuses apache (and hence PHP) - meaning that you can't look up hosts from within PHP, even though you can from the commandline.... The short-term solution is to restart apache.

You'll get "php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in ..." messages as symptoms. Restart apache, and they're gone :-)

Simon

Comment by Simon at php.net

Domain bu IP adresine çözülemez.

DNS yerel çalışan varsa, bunu yeniden başlatmayı deneyin. Değilse, DNS kontrol edin veya / etc / resolve.conf (yani nameserver 8.8.8.8) farklı bir sunucu ekleyin.

Ayrıca hosts dosyasına statik bir girdi olarak etki alanını ekleyebilirsiniz:

Linux sunucu üzerinde kullanarak / etc / hosts dosyasına DNS bilgileri eklemek:

echo '127.0.0.1 www.otherdomain.com' >> /etc/hosts

127.0.0.1 ... Web sitenizin IP adresi ve www.otherdomain.com etki alanı adı kullanarak.

Sen nslookup kullanarak herhangi bir domain IP adresini, yani bulabilirsiniz

nslookup www.otherdomain.com

make sure that website can be reached from you server. also make sure that you are using has a proper DNS server setup.

Eğer web sitesi çalışıyor eminseniz ... bu etki çözmüyor neden anlamaya çalışın, sonra / etc / hosts dosyasını değiştirerek denemek ve test amaçlı web sitesinin IP adresini ekleyebilirsiniz.

I CiviCRM coğrafi kodlama ile bu sorunu içine koşuyordu! Shehi'ye gibi Apache yeniden başlatarak sorunu sabit önerilir.