Originally posted by 3mors
But if you wanna learn, you'd better set up an apache server & php on your mac. It's very easy.
To activate php, you could manually edit the apahce configuration and library files, but these neat trickx do it for you:
Go to the terminal
cd /etc/httpd
sudo apxs -e -a -n php4 libexec/httpd/libphp4.so
sudo perl -p -i.bak -e 's%#(AddType \S+-php[ -])%$1%i' httpd.conf
Now any .php files in your webserver directory will be dealt with accordingly.
I have my apache set up to parse html files as php - useful if you have an html editor that doesn't like non html extensions like Golive.
In the terminal:
sudo pico /etc/httpd/httpd.conf
in the pico text editor controll-W to search, and search for "AddType"
Edit the line with .html in it, if there is one (if not just add this) so it looks like:
AddType application/x-httpd-php .html
Exit, saving.
type sudo apachectl graceful
to restart the webserver.
Bernie
)
(Good this pooch, AdmiralAK? ;o) lol