ACCU Home page ACCU Conference Page
Search Contact us ACCU at Flickr ACCU at GitHib ACCU at Facebook ACCU at Linked-in ACCU at Twitter Skip Navigation

Search in Book Reviews

The ACCU passes on review copies of computer books to its members for them to review. The result is a large, high quality collection of book reviews by programmers, for programmers. Currently there are 1949 reviews in the database and more every month.
Search is a simple string search in either book title or book author. The full text search is a search of the text of the review.
    View all alphabetically
Title:
Writing Apache Modules with Perl and C
Author:
L. Stein&D. MacEachern
ISBN:
1 56592 567 X
Publisher:
O'Reilly
Pages:
724pp
Price:
£23-50
Reviewer:
Rick Stones
Subject:
internet
Appeared in:
11-6
Apache, for anyone that doesn't know, is justifiably the Internet's number one web server (see the Web Server Survey onhttp://www.netcraft.com/). It's fast, configurable, rock solid, runs on a wide range of UN*X versions (and, of course, Linux), Win32 systems and comes complete with source code. What more could you ask? Well one think you could ask for is a way of extending the functionality in a CGI like way, but more efficient and with better access to the internals of the web server. You can have that too - with Apache Modules.

Apache modules are code written outside the web server main source, but to a defined API. The original interface was 'C' only, and whilst valuable, did require some programming care. More recently mod_perl has been implemented, which embeds a Perl interpreter in the web server, so you can write your modules in Perl, and still have full access to the Apache module API. The main drawback is the process sizes, which can get a little large, but hey, memory is cheap at the moment.

This book starts from the assumption that either you are on a UN*X/Linux machine and have the Apache sources (http://www.apache.org/), or have a running binary on Win32 systems. To get mod_perl installed on UN*X/Linux you do need to re-compile the Apache sources, which is a minor drawback, but hardly a major problem; then you need to fetch and link in the mod_perl code, also available from links on the Apache web site. Win32 users, for once, get it slightly easier and just need to fetch a .dll. All this is clearly explained in the book, though I did have a slight problem when one of the installation tests for mod_perl failed, and it took me a while to discover I had actually built myself a working mod_perl enabled Apache at the first attempt.

The initial chapters of the book walk you carefully through your first Perl and 'C' modules, before the main body of the book gets down to more detail. The book doesn't tell you how to configure Apache, but does tell you just enough so you can manually start and stop the server. Apache's default configuration file is usually enough to get started on, so this is not a problem. There is a huge amount to the Apache API, and this book covers it in detail, with good explanations and loads of examples. The only drawback might be for 'C' programmers, who will be disappointed that almost all the examples are in Perl, though the 'C' API is very similar, and documented separately towards the end of the book. I think after the initial shock of all those Perl examples, 'C' programmers with either decide Perl isn't so bad after all, or discover that converting the examples to 'C' is actually pretty easy. Either way, I think both groups will be pretty happy with this book. Recommended.