After waiting all night for OSX Yosemite to install, I finally booted into the new version of the OS… to find that Apache and PHP were no longer configured. Great. I remember a similar thing from the Mavericks update, so here is a list of the steps I followed to get things working again. Your results may very, but this may at least help.
- First you need to sort out the Apache config file
/etc/apache2/httpd.conf, which has been reset to some default. Your old config file will be in the same directory, with some suffi like
.pre-update. In my case, I re-un-commented these lines:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so LoadModule php5_module libexec/apache2/libphp5.so
I also needed to change
AllowOverride Anyin the
- Then turn on Apache:
sudo apachectl restart
- PHP’s config file has also disappeared, but again your old ones will be in
/etc/with some suffixes as above. In my case I started fresh with:
sudo cp -a /etc/php.ini.default /etc/php.ini
The only thing I added was:
date.timezone = "Europe/Stockholm"
Restart Apache again.
- Now I need to install PEAR. Clear anything named
pearin your home directory, then:
cd /usr/lib/php sudo php install-pear-nozlib.phar
Then add the path where PEAR installed to
include_path = ".:/usr/lib/php/pear"
- I wanted to install the
MongoPECL package, which apparently requires the Command Line Tools, so:
And then finally I can install it:
sudo pecl install mongo
Add the following line to
Then restart Apache one more time.