mod_ perl Configuration

Apache uses a standard protocol, the Common Gateway Interface (CGI), to communicate with externally executed scripts such as those we put in the cgi-bin directory in the preceding chapter. When a CGI script begins executing, it can assume that Apache has set up certain environment variables. For example, REMOTE_ADDR and REQUEST_URI indicate the client’s host IP number and the request path. When Apache uses mod_perl to execute a script directly, it doesn’t set up the CGI environment. In principle, there is no need, because a script that has direct access to Apache’s internals obviously can extract that information itself if it wants. But the practical implication of this is that Perl CGI scripts won’t function properly ...

Get MySQL and Perl for the Web 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.