Important, before you begin:
1. You will edit the "httpd.conf" file to enable PHP service for Apache. Follow these steps carefully, and be sure not to change the file in any other way than specifically described.
2. If Apache does not work as expected or fails to start after you have modified the file, you can delete it and replace it with a duplicate of the "httpd.conf.default" file. After making a duplicate of the default, change its name to "httpd.conf" (to match the one you are replacing). Be sure never to modify the original "httpd.conf.default" file.
3. A pound sign (#) in the front of a line indicates that the line will not be read by Apache when starting. Removing pound signs, as described, will cause Apache to read the configuration from that line.
4. Beyond the Knowledge Base, Apple does not offer technical support for configuring or using PHP. See
www.php.net for more PHP information.
How to enable PHP
Follow these steps at the server:
1. Choose Log Out from the Apple menu.
2. Type "root" as the login user name. Enter your Admin user password, and log in.
3. Open TextEdit.
4. Choose Open from the File menu.
5. In the Go To field, type: /etc/httpd/
6. Locate and open the file named "httpd.conf".
7. In this file, find the line that reads:
#LoadModule php_module modules/mod_php.so
8. Remove the pound sign (#) from the start of this line. Do not modify the line in any other way.
9. Scroll down until you find the line that reads:
#AddModule mod_php.c
10. Remove the pound sign (#) from the start of this line. Do not modify the line in any other way.
11. Scroll down until you find the lines that read:
#AddType application/x-httpd-php .php
#AddType application/x-httpd-php-source .phps
12. Remove the pound signs (#) from these lines. Do not modify the lines in any other way.
13. Choose Save from the File menu.
14. Quit TextEdit.
15. Open Server Admin and log in.
16. Stop and restart the Web Server.
You can verify that PHP is working correctly by connecting to the server and loding the "info.php" file. If you have changed the document root or moved this file you, may not be able to do this.