Enable PHP on mac OS X 10.4.10
Posted on 2007-08-01
I am trying to enable PHP on my OS X 10.4.10. I have been working with PHP on a hosted site but will be traveling and need to install it locally (with mySQL) so that I can work on the plane. I found articles online which say to modify:
by un-commenting the two lines and then restarting apache:
LoadModule php4_module libexec/httpd/libphp4.so
I have done this and verified that these lines are no longer commented out. I guess because of the version, my httpd.conf file already has the following relevant entries:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php index.htm
It seems this couldn't be easier but when I open local php files in a browser, I see the php code instead of the interpereted info. I tried a default <?php phpinfo(); ?> and also opened a larger php file that I have been working with on my hosted server but the browser just displays the raw php code. I have restarted my computer and scowered the web but have found surprisingly little about this issue. I'd prefer not to install a new version of PHP as it should be unnecessary and I'm afraid it will lead to more challenges (the version of php doesn't matter, I'm not doing anything fancy with my code). I have also visited my default local web site and I get the apache splash page saying that it is running.
Any help you can provide is greatly appreciated.