Try adding your hostname in the /etc/hosts file
::1 localhost YourMac.local
127.0.0.1 localhost YourMac.local
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have restored my Mac back to factory installation of Mac OS X 10.10 Yosemite and have put just a few applications on:
PhpStorm, Sublime, Xcode, SequelPro, iTerm2, VirtualBox etc
I have installed PHP from http://php-osx.liip.ch as I am using Homestead for actual project development but I like to run things locally for quickness.
The problem I am having is that php has a 5 second delay with everything I run.
Running php -v yields
PHP 5.6.6 (cli) (built: Feb 20 2015 22:47:58)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
Running which php yields (showing that I am using the PHP-OSX.LIIP version from the link above.
/usr/local/php5/bin/php
My /etc/hosts file is now very lean compared to what it was before I restored my Mac.
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
# Local server details
192.168.0.4 server
# Homestead Development
192.168.10.10 my-project.dev
When I run time php index.php on an extremely simple page I can confirm that it takes over 5 seconds to run. (I'm following @JeffreyWay's tutorial on the Template design pattern)
string(21) "laying down the bread"
string(16) "add some lettuce"
string(15) "add some turkey"
string(19) "add oil and vinegar"
real 0m5.046s
user 0m0.027s
sys 0m0.013s
When I run it again just to check...
string(21) "laying down the bread"
string(16) "add some lettuce"
string(15) "add some turkey"
string(19) "add oil and vinegar"
real 0m3.690s
user 0m0.027s
sys 0m0.017s
Does anyone have any idea why it would be doing this?
Have a look in /usr/local/php5/php.d/50-extension-imap.ini and comment out the extension=..imap.so line.
Please or to participate in this conversation.