Mysterio3 wrote:
My friend is developing an application which needs to be tested on Mac Server.
When trying to browse a .php file in browser, it's not being executed, it's just like a text file.
In the readme.txt of the application (which is open-source) is written: Enable PHP on Mac Server.
What does this currently mean and how to solve it?
Thanks!
PHP is included on Macs with OS X version 10.5+ (Leopard), but it's not enabled
by default. You have to access the main Apache configuration file and comment
out a line of code in order to get PHP going. This file is called http.conf, and
is a hidden file located down inside the Apache install folder.
You're looking for the following line of code, which has a pound symbol (#) in
front of it to comment it out:
#LoadModule php5_module libexec/apache2/libphp5.so
You need to remove the pound symbol and restart the server to enable PHP. The
http.conf document is owned by "root," which means you'll have to enter your
password to change it. You'll probably also want to tweak the php.ini file so that
Apache uses it. For more detailed information about how to carry out these steps
and enable PHP, visit Enabling PHP in Mac OS X 10.5 .