Mac apache not working - apachectl configtest errors I'm trying to get off of MAMP and run local versions of an AMP stack on my Mac, but when I try to start apache and run localhost from a browser, it's not coming up with anything.

In running apachectl configtest, I see the following errors, but I don't know how to fix.

Is there a way to do a clean reinstall of the AMP stack on a Mac? Is this even the recommended fix?


  httpd: Syntax error on line 527 of /private/etc/apache2/httpd.conf: Syntax error on line 8 of /private/etc/apache2/other/+php-osx.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): Symbol not found: _unixd_config\n  Referenced from: /usr/local/php5/libphp5.so\n  Expected in: /usr/sbin/httpd\n in /usr/local/php5/libphp5.so
Looks like you have an extra conf file in the other directory. This file (+php-osx.conf) is trying to load PHP from /usr/local, rather than the system-supplied PHP. I know my PHP install works and am using the bog-standard Apple supplied Apache and PHP. Call to PHP module should be in the main httpd.conf file - this line is there, but commented out, by default in the Apple-supplied config:

LoadModule php5_module libexec/apache2/libphp5.so


And in other there should only be the single php5.conf file, contents:

&lt;IfModule php5_module&gt;
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    &lt;IfModule dir_module&gt;
        DirectoryIndex index.html index.php
    &lt;/IfModule&gt;
&lt;/IfModule&gt;


The Apple-provided Apache2 should include the default config files in /etc/apache2, labeled with a suffix such as .original, .pre-update, or ~previous. Same goes for the conf files in subdirectories.