dongze5043 2013-10-06 14:53
浏览 21

PHP无法在OS X Server中运行

I have a server running OS X 10.8.2. I wanted to install PhpMyAdmin, so I have installed MySQL and PHP (through MacPorts) too. Then I put the PhpMyAdmin folder in the root of my webserver, but when I surf to http://SERVERADDRESS/PhpMyAdmin on any web browser on any device I get the source code of the index.php file instead of the page loaded (see screenshot). Can you help me please?

Screenshot

  • 写回答

1条回答 默认 最新

  • doukang5966907 2013-10-06 14:57
    关注

    First, open terminal. In it, write:

    sudo nano /etc/apache2/httpd.conf
    

    Find the row with

    #LoadModule php5_module libexec/apache2/libphp5.so
    

    and remove the comment from the beginning of the line (remove the #). Hit Ctrl+O and then Control+X to save and quit.

    Then restart apache:

    sudo apachectl restart
    

    Then try and reload phpmyadmin.

    评论

报告相同问题?