Create bookmark
Practical mod_perl
Notes
Please login to add notes
- Table of Contents
- + Preface
- Part I
-
+
Introducing CGI and mod_perl
-
+
Getting Started Fast
- Installing mod_perl 1.0 in Three Steps
- + Installing mod_perl on Unix Platforms
- Configuring and Starting the mod_perl Server
- + Installing mod_perl for Windows
- Preparing the Scripts Directory
- + A Sample Apache::Registry Script
- A Simple mod_perl Content Handler
- Is This All We Need to Know About mod_perl?
- References
-
+
Installing mod_perl
- + Configuring the Source
- + Building mod_perl (make)
- + Testing the Server (make test)
- + Installation (make install)
- + Installation Scenarios for Standalone mod_perl
- + Building mod_perl with Other Components
- Installing mod_perl with the CPAN.pm Interactive Shell
- Installing mod_perl on Multiple Machines
-
+
Installation into a Nonstandard Directory
- Installing Perl Modules into a Nonstandard Directory
- + Finding Modules Installed in Nonstandard Directories
- Using the CPAN.pm Shell with Nonstandard Installation Directories
- Making a Local Apache Installation
- Nonstandard mod_perl-Enabled Apache Installation
- Nonstandard mod_perl-Enabled Apache Installation with CPAN.pm
- + How Can I Tell if mod_perl Is Running?
- + General Notes
- References
-
+
mod_perl Configuration
-
+
Apache Configuration
- Configuration Files
- Configuration Directives
- + <Directory>, <Location>, and <Files> Sections
- Merging <Directory>, <Location>, and <Files> Sections
- Subgrouping of <Directory>, <Location>, and <Files> Sections
- Options Directive Merging
- MinSpareServers, MaxSpareServers, StartServers, MaxClients, and MaxRequestsPerChild
- + mod_perl Configuration
- + The Startup File
- + Apache Configuration in Perl
- Validating the Configuration Syntax
- The Scope of mod_perl Configuration Directives
- Apache Restarts Twice
- Enabling Remote Server Configuration Reports
- + Tips and Tricks
- + Configuration Security Concerns
- General Pitfalls
- References
-
+
Apache Configuration
-
+
Web Server Control, Monitoring, Upgrade, and Maintenance
- Starting the Server in Multi-Process Mode
- Starting the Server in Single-Process Mode
- + Using kill to Control Processes
- Using apachectl to Control the Server
- Validating Server Configuration
- + Setuid root Startup Scripts
- Preparing for Machine Reboot
-
+
Upgrading a Live Server
- + Three-Tier Server Scheme: Development, Staging, and Production
-
+
Web Server Monitoring
-
+
Server Maintenance Chores
- References
-
+
Coding with mod_perl in Mind
- + Before You Start to Code
- + Exposing Apache::Registry Secrets
- + Namespace Issues
- + Perl Specifics in the mod_perl Environment
- + CHECK and INIT Blocks
- + Apache::Registry Specifics
- + Transition from mod_cgi Scripts to Apache Handlers
- + Loading and Reloading Modules
- + Handling the “User Pressed Stop Button” Case
- Handling Server Timeout Cases and Working with $SIG{ALRM}
- Generating Correct HTTP Headers
- Method Handlers: The Browse and See, Browse and View Example
- References
- Part II
- + Identifying Your Performance Problems
-
+
Choosing a Platform for the Best Performance
-
+
Essential Tools for Performance Tuning
-
+
Improving Performance with Shared Memory and Proper Forking
- + Tuning Performance by Tweaking Apache’s Configuration
-
+
Server Setup Strategies
- mod_perl Deployment Overview
- Standalone mod_perl-Enabled Apache Server
-
+
One Plain and One mod_perl-Enabled Apache Server
- One Light Non-Apache and One mod_perl- Enabled Apache Server
- Adding a Proxy Server in httpd Accelerator Mode
- + The Squid Server and mod_perl
- + Apache’s mod_proxy Module
- mod_rewrite Examples
- Getting the Remote Server IP in the Backend Server in the Proxy Setup
- + Frontend/Backend Proxying with Virtual Hosts
- HTTP Authentication with Two Servers and a Proxy
- + When One Machine Is Not Enough for Your RDBMS DataBase and mod_perl
- Running More than One mod_perl Server on the Same Machine
- SSL Functionality and a mod_perl Server
- Uploading and Downloading Big Files
- References
-
+
TMTOWTDI: Convenience and Habit Versus Performance
- Apache::Registry PerlHandler Versus Custom PerlHandler
- Apache::args Versus Apache::Request::param Versus CGI::param
- Buffered Printing and Better print() Techniques
- Interpolation, Concatenation, or List
- + Keeping a Small Memory Footprint
- + Object Methods Calls Versus Function Calls
- Using the Perl stat() Call’s Cached Results
- time() System Call Versus $r->request_time
- Printing Unmodified Files
- Caching and Pre-Caching
- Caching with Memoize
- + Comparing Runtime Performance of Perl and C
- References
-
+
Defensive Measures for Performance Enhancement
- + Improving Performance Through Build Options
-
+
HTTP Headers for Optimal Performance
- Part III
- + Databases Overview
- + mod_perl Data-Sharing Techniques
-
+
DBM and mod_perl
- + Relational Databases and mod_perl
- Part IV
-
+
Error Handling and Debugging
- + Warnings and Errors Explained
- Debugging Code in Single-Server Mode
- Tracing System Calls
- Tracing mod_perl-Specific Perl Calls
-
+
Debugging Perl Code
- Locating and Correcting Syntax Errors
- Using Apache::FakeRequest to Debug Apache Perl Modules
- Using print() for Debugging
- Using print() and Data::Dumper for Debugging
- The Importance of a Good, Concise Coding Style
- Introduction to the Perl Debugger
- Interactive Perl Debugging Under mod_cgi
- Noninteractive Perl Debugging Under mod_perl
- + Interactive mod_perl Debugging
- + Analyzing Dumped core Files
-
+
Hanging Processes: Detection and Diagnostics
- + Useful Debug Modules
- + Looking Inside the Server
- References
-
+
Troubleshooting mod_perl
- + Configuration and Startup
- + Code Parsing and Compilation
-
+
Runtime
- foo ... at /dev/null line 0
- Segfaults When Using XML::Parser
- exit signal Segmentation fault (11)
- CGI Code Is Returned as Plain Text Instead of Being Executed
- rwrite returned -1
- Global symbol “$foo” requires explicit package name
- Use of uninitialized value at (eval 80) line 12
- Undefined subroutine &Apache::ROOT::perl::test_2epl:: some_function called at
- Callback called exit
- Out of memory!
- syntax error at /dev/null line 1, near “line arguments:”
- + Shutdown and Restart
-
+
Getting Help and Online Resources
- Part V
- + mod_perl 2.0: Installation and Configuration
- + Programming for mod_perl 2.0
- Part VI
-
+
mod_perl Recipes
- Emulating the Authentication Mechanism
- Reusing Data from POST Requests
- Redirecting POST Requests
- Redirecting While Maintaining Environment Variables
- Handling Cookies
- Sending Multiple Cookies with the mod_perl API
- Sending Cookies in REDIRECT Responses
- CGI::params in the mod_perlish Way
- Sending Email from mod_perl
- mod_rewrite in Perl
- Setting PerlHandler Based on MIME Type
- Singleton Database Handles
- Terminating a Child Process on Request Completion
- References
-
+
Apache Perl Modules
-
+
Development-Stage Modules
- Apache::Reload—Automatically Reload Changed Modules
- Apache::PerlVINC—Allow Module Versioning in <Location> and <VirtualHost> blocks
- Apache::DProf—Hook Devel::DProf into mod_perl
- Apache::SmallProf—Hook Devel::SmallProf into mod_perl
- Apache::FakeRequest—Fake Request Object for Debugging
- Apache::test—Facilitate Testing of Apache::* Modules
-
+
Modules to Aid Debugging
- Apache::DB—Hooks for the Interactive Perl Debugger
- Apache::Debug—Utilities for Debugging Embedded Perl Code
- Apache::DebugInfo—Send Debug Information to Client
- Apache::Leak—Module for Tracking Memory Leaks in mod_perl Code
- Apache::Peek—A Data Debugging Tool for the XS Programmer
- Apache::Symbol—Avoid the Mandatory ‘Subroutine Redefined’ Warning
- Apache::Symdump—Symbol Table Snapshots
-
+
Control and Monitoring Modules
- Apache::Watchdog::RunAway—Hanging Processes Monitor and Terminator
- Apache::VMonitor—Visual System and Apache Server Monitor
- Apache::SizeLimit—Limit Apache httpd Processes
- Apache::GTopLimit—Limit Apache httpd Processes
- Apache::TimedRedirect—Redirect URLs for a Given Time Period
- Apache::Resource—Limit Resources Used by httpd Children
- Apache::Status—Embedded Interpreter Status Information
-
+
Server Configuration Modules
- Apache::ModuleConfig—Interface to Configuration API
- Apache::PerlSections—Utilities for Working with <Perl> Sections
- Apache::httpd_conf—Generate an httpd.conf File
- Apache::src—Methods for Locating and Parsing Bits of Apache Source Code
- Apache::ConfigFile—Parse an Apache-Style httpd.conf Configuration File
- Authentication-Phase Modules
- Authorization-Phase Modules
- + Access-Phase Modules
- + Type Handlers
- + Trans Handlers
- + Fixup Handlers
- + Generic Content-Generation Modules
-
+
Application-Specific Content-Generation Modules
- Apache::AutoIndex—Perl Replacement for the mod_autoindex and mod_dir Apache Modules
- Apache::WAP::AutoIndex—WAP Demonstration Module
- Apache::WAP::MailPeek—Demonstrate Use of WML Delivery
- Apache::Archive—Expose Archive Files Through the Apache Web Server
- Apache::Gateway—Implement a Gateway
- Apache::NNTPGateway—NNTP Interface for a mod_perl- Enabled Apache Web Server.
- Apache::PrettyPerl—Syntax Highlighting for Perl Files
- Apache::PrettyText—Reformat .txt Files for Client Display
- Apache::RandomLocation—Random File Display
- Apache::Stage—Manage a Staging Directory
- Apache::Roaming—A mod_perl Handler for Roaming Profiles
- Apache::Backhand—Write mod_backhand Functions in Perl
- + Database Modules
-
+
Toolkits and Frameworks for Content- Generation and Other Phases
- Apache::ASP—Active Server Pages for Apache with mod_perl
- Apache::AxKit—XML Toolkit for mod_perl
- HTML::Embperl—Embed Perl into HTML
- Apache::EmbperlChain—Process Embedded Perl in HTML in the OutputChain
- Apache::ePerl—Embedded Perl 5 Language
- Apache::iNcom—E-Commerce Framework
- Apache::Mason—Perl-Based Web Site Development and Delivery System
- Apache::PageKit—Web Applications Framework
- Template Toolkit—Template Processing System
-
+
Output Filters and Layering Modules
- Apache::OutputChain—Chain Stacked Perl Handlers
- Apache::Clean—mod_perl Interface Into HTML::Clean
- Apache::Filter—Alter the Output of Previous Handlers
- Apache::GzipChain—Compress HTML (or Anything) in the OutputChain
- Apache::PassFile—Send File via OutputChain
- Apache::Gzip—Auto-Compress Web Files with gzip
- Apache::Compress—Auto-Compress Web Files with gzip
- Apache::Layer—Layer Content Tree Over One or More Others
- Apache::Sandwich—Layered Document (Sandwich) Maker
- Apache::SimpleReplace—Simple Template Framework
- Apache::SSI—Implement Server-Side Includes in Perl
-
+
Logging-Phase Handlers
- Apache::RedirectLogFix—Correct Status While Logging
- Apache::DBILogConfig—Logs Access Information in a DBI Database
- Apache::DBILogger—Tracks What’s Being Transferred in a DBI Database
- Apache::DumpHeaders—Watch HTTP Transaction via Headers
- Apache::Traffic—Track Hits and Bytes Transferred on a Per- User Basis
-
+
Core Apache Modules
- Apache::Module—Interface to Apache C Module Structures
- Apache::ShowRequest—Show Phases and Module Participation
- Apache::SubProcess—Interface to Apache Subprocess API
- Apache::Connection—Interface to the Apache conn_rec Data Structure
- Apache::Constants—Constants Defined in httpd.h
- Apache::ExtUtils—Utilities for Apache C/Perl Glue
- Apache::File—Advanced Functions for Manipulating Files on the Server Side
- Apache::Log—Interface to Apache Logging
- Apache::LogFile—Interface to Apache’s Logging Routines
- Apache::Scoreboard—Perl Interface to Apache’s scoreboard.h
- Apache::Server—Perl Interface to the Apache server_rec Struct
- Apache::Table—Perl Interface to the Apache Table Struct
- Apache::URI—URI Component Parsing and Unparsing
- Apache::Util—Perl Interface to Apache C Utility Functions
-
+
Other Miscellaneous Modules
- Apache::Session—Maintain Session State Across HTTP Requests
- Apache::RequestNotes—Easy, Consistent Access to Cookie and Form Data Across Each Request Phase
- Apache::Cookie—HTTP Cookies Class
- Apache::Icon—Look Up Icon Images
- Apache::Include—Utilities for mod_perl/mod_include Integration
- Apache::Language—Perl Transparent Language Support for Apache Modules and mod_perl Scripts
- Apache::Mmap—Perl Interface to the mmap(2) System Call
- Apache::GD::Graph—Generate Graphs in an Apache Handler
- Apache::Motd—Provide motd (Message of the Day) Functionality to a Web Server
- Apache::ParseLog—Object-Oriented Perl Extension for Parsing Apache Log Files
- Apache::RegistryLoader—Compile Apache::Registry Scripts at Server Startup
- Apache::SIG—Override Apache Signal Handlers with Perl’s Signal Handlers
- Apache::TempFile—Allocate Temporary Filenames for the Duration of a Request
- Xmms—Perl Interface to the xmms Media Player
- Module::Use—Log and Load Used Perl Modules
-
+
Development-Stage Modules
- + ISPs Providing mod_perl Services
-
+
The Template Toolkit
-
+
The AxKit XML Application Server
- + HTTP Status Codes
- Index
mod_perl embeds the popular programming language Perl in the Apache web server, giving rise to a fast and powerful web programming environment. Practical mod_perl is the definitive book on how to use, optimize, and troubleshoot mod_perl.
New mod_perl users will learn how to quickly and easily get mod_perl compiled and installed. But the primary purpose of this book is to show you how to take full advantage of mod_perl: how to make a mod_perl-enabled Web site as fast, flexible, and easily-maintainable as possible. The authors draw from their own personal experience in the field, as well as the combined experience of the mod_perl community, to present a rich and complete picture of how to set up and maintain a successful mod_perl site.
This book is also the first book to cover the "next generation" of mod_perl: mod_perl 2.0, a completely rewritten version of mod_perl designed for integration with Apache 2.0, which for the first time supports threads.
The book covers the following topics, and more:
Configuring mod_perl optimally for your web site
Porting and optimizing programs for a mod_perl environment
Performance tuning: getting the very fastest performance from your site
Controlling and monitoring the server to circumvent crashes and clogs
Integrating with databases efficiently and painlessly
Debugging tips and tricks
Maximizing security
Written for Perl web developers and web administrators, Practical mod_perl is an extensive guide to the nuts and bolts of the powerful and popular combination of Apache and mod_perl. From writing and debugging scripts to keeping your server running without failures, the techniques in this book will help you squeeze every ounce of power out of your server. True to its title, this is the practical guide to mod_perl.
Test the closed alpha on paperc.com
Book Details
Authors
Categories
Computers > Programming Languages > JavaScript
Publishers
Publication year : 2003
License: All rights reserved ©
Times read: 510

