I have searched and cannot find a reason why this isn't working. I have tried executing from command line as well as apache and it does not work.

```
<?php
echo file_get_contents("http://google.com");
?>

```

I have a simple php script as shown above that simply makes a request to google and outputs the contents.

Error:

```
Warning: file_get_contents(http://google.com): failed to open stream: Operation timed out in /Applications/MAMP/htdocs/p.php on line 2

```

PHP version:
 PHP 5.6.2 (cli) (built: Oct 20 2014 16:21:27) 

```
allow_url_fopen = On

```

The odd part is if I use /usr/bin/php it works fine. (Built in apple version)

Here is the wireshark capture:
<https://www.dropbox.com/s/u7jdg494fmud22i/packet_capture_php_network.pcapng?dl=0>