localhost/testphp.php works ok, but not sure if this means Apache or some other process is handling the testphp file. I'd like to assume this means Apache has PHP support enabled, at least for explicitly referenced files, but I'm a raw recruit indeed and have no business assuming anything
Reviewing the book, Appendix A, page 421, I see a "<FilesMatch \.php$> SetHandler application" edit to be applied to /usr/local/apache2/conf/httpd.conf. This is described as an important command to setup Apache to recognize PHP scripts, and perhaps this is the very means by which browsers send script files to Apache. But httpd.conf does not exist on my system! (sudo su find / -name "httpd.conf"). In fact, the entire directory structures for Apache 2.2 and PHP5 appear to be completely different from those described in the book.
Girding up my loins and pressing on, relying on Google, I was able to discover /etc/apache2/mods-enabled/php5.conf with a similar command. However I notice this in php5.conf :
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Deny from all
So now I'm wondering if .php files with content bounded by <?php ... ?> are considered "raw" by the Apache server? If so, this /etc/apache2/mods-enabled/php5.conf seems to be denying their execution. Could this be the reason the browser tries to download these files instead of successfully handing them to the Apache server?
However, since I've purchased the book because I wanted a step-by-step tutorial for newbies and am too inexperienced to be working out what seem to be advanced level system configuration modifications, I am also wondering if it wouldn't be better to start from scratch with Apache 2.4. Linux Mint 14's Software Manager installs Apache 2.2.22. Perhaps 2.4 vs 2.2 explains the many file and directory structure differences between what is in the book and what is on my system. That's a big step to take and it would be phenomenally dissapointing if after manually replacing Apache 2.2 with 2.4 I were to find httpd.conf still missing and php5.conf still containing the same FilesMatch Deny for PHP scripts.
Maybe commenting out the "Oder Deny, Allow" and "Deny from all" commands in php5.conf would be worth trying before getting crazy with re-installations.