Bug #55277 [Com]: After OS X Lion upgrade, file_get_contents issues a warning
| From: | laruence@php.net | Date: | Wed, 27 Jul 2011 06:36:22 +0000 |
| Subject: | Bug #55277 [Com]: After OS X Lion upgrade, file_get_contents issues a warning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162210@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55277&edit=1
ID: 55277
Comment by: laruence@php.net
Reported by: michaelozeryansky at hotmail dot com
Summary: After OS X Lion upgrade, file_get_contents issues a
warning
Status: Open
Type: Bug
Package: *Network Functions
Operating System: OS X Lion
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Please check that your nameserver is running and setup
correctly. Check the same with your internet server.
Previous Comments:
------------------------------------------------------------------------
[2011-07-24 19:10:49] michaelozeryansky at hotmail dot com
Description:
------------
After I upgraded to Mac OS X Lion, my php script issues a warning for file_get_contents(). If I run
the script a second time, there's no warnings.
This script runs when I open my browser to check if I'm logged into my schools network. Then if
I'm not logged in, it uses curl to log in. but the problem is with file_get_contents().
I did test getaddrinfo() in a cpp program. When I used "http://www.google.com" it fails with the same error as
php displays, but when I use "www.google.com" it succeeds. This didn't happen before,
but could this be the problem? Then again the example on php.net is:
<?php
$homepage = file_get_contents('http://www.example.com/');
echo $homepage;
?>
Test script:
---------------
<?php
$google = file_get_contents("http://www.google.com/");
?>
Expected result:
----------------
No warnings, like when I had OS X Snow Leopard.
Actual result:
--------------
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo
failed: nodename nor servname provided, or not known in /Users/michael/Sites/personal/homepage.php
on line 3
Warning: file_get_contents(http://www.google.com/) [function.file-get-contents]: failed to open
stream: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
in /Users/michael/Sites/personal/homepage.php on line 3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55277&edit=1