12.3. Configuration

If you installed Linux as suggested in Chapter 2, Apache is already configured for PHP. To use PHP, simply name the PHP files with the .php extension.

You might note that this approach is contrary to that used for Embperl and Mason, where we decided against using a separate extension for those files. The logic was to not provide too much information about our site and to keep a clean URL look throughout the site (all pages are accessed through an .html extension). But because Apache is configured to use .php files out of the box, we’ll stick with it out of sheer laziness (one of the desirable properties of a good programmer).

There is a way to configure Apache so that all .html files in a directory are processed by PHP. See ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.