10.3: Enable the built-in PHP module

Nov 13, '03 10:12:00AM

Contributed by: Anonymous

If you did a fresh install of 10.3 you do not need to install PHP - it is installed by default! To enable it you just need to uncomment the following lines in the /etc -> httpd -> httpd.conf file:

LoadModule php4_module        libexec/httpd/libphp4.so
...
...
AddModule mod_php4.c
Now stop and restart Apache (Personal Web Sharing). To test it, create the following test.php file in your sites directory:

<?php>
 phpinfo();
?>
Now load test.php in your browser:
http://localhost/~username/test.php
And you should see the PHP configuration. Enjoy!

[robg adds: This is even easier than it was in 10.2, and make sure you see the related hint on editing the php.ini file.]

Comments (27)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031105122808344