note 33228 added to function.fopen

From: Date: Thu, 19 Jun 2003 17:24:16 +0000
Subject: note 33228 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-50668@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33228 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33228&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33228&report=yes

« previous php.notes (#50668) next »