localhost doesn't execute php files after update to Maverick/Yosemite OS

后端 未结 2 1831
北海茫月
北海茫月 2020-12-25 13:08

So I\'ve upgraded to Mavericks (or maybe Yosemite) yesterday but now I only get a view of my directory when I visit localhost but the included index.php isn\'t executed anym

相关标签:
2条回答
  • 2020-12-25 13:49

    Found the solution:

    Have to uncomment this line in /etc/apache2/httpd.conf as well:

    LoadModule php5_module libexec/apache2/libphp5.so
    

    Don't forget to restart Apache after changes:

    sudo apachectl restart
    
    0 讨论(0)
  • 2020-12-25 14:03

    This did the trick for me:

    sudo cp /etc/apache2/httpd.conf.pre-update /etc/apache2/httpd.conf
    

    Basically restores your previous config. Not sure why this doesnt happen by default - But o well.

    UPDATE: Same for the php.ini file:

    sudo cp /etc/php.ini-5.2-previous /etc/php.ini
    
    0 讨论(0)
提交回复
热议问题