Localhost issue OS X Maverick

I love everything about OS X Maverick except that it breaks my localhost. After doing some investigation, actually this already happened to people who upgrade to Mountain Lion before. I didn't face this until Maverick because i skipped 10.8 (went from 10.7 to 10.9).

So many guides on the internet, with some of them i think misleading while others are just not ideal and 'proper'.

Some of them solved the issue using old httpd.conf file while some don't. In my opinion, no need to revert to old file. This is because i learned that if i reverted to old httpd.conf, i have then to do some extra work commenting the "" tag below, complicating thing even more and most importantly, didn't work for me.

Yes it may works for you but i don't think that's the proper solution.

How i solve the issue: (exactly like below, no modification)

1) run
sudo apachectl configtest

This tells me i have some issue with entrophy php
httpd: Syntax error on line 501 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+entropy-php.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _libiconv\n Referenced from: /usr/local/php5/lib/libintl.8.dylib\n Expected in: /usr/lib/libiconv.2.dylib\n

That helps a lot

2) Open httpd.conf
Uncomment (remove the '#') for line libphp5.so

It works!

Shorter than any other guide i found in the internet. This looks and sounds more proper solution to me because what it's basically doing is load the module that is missing - that's it.

Tags: