Installing PLP in 9 easy steps.


Make sure you have Perl 5.6 or newer, and that you have an 1.3 version of Apache (tested with 1.3.12 and 1.3.24).
Deciding on mod_perl versus CGI

All default Apache installations allow for CGI to be used. However, CGI is very inefficient because a new process has to be started for every script execution. With mod_perl, you have a resident Perl interpreter built into Apache, which allows for speeds up to six times as fast as with CGI.
mod_perl is not hard to install, as you can read in Stas Bekman's quick start guide "mod_perl in 30 minutes". As always, Debian users are lucky people: packages are available (read these instructions).

Downloading and installing the PLP modules

Get the distribution from the files directory of this site, and follow the usual installation procedures:
tar -zvxf PLP-versionnumber.tar.gz
cd PLP-versionnumber
perl Makefile.PL
make install
Once again, Debian users are blessed with a package, which is also downloadable from the files directory.
dpkg -i libplp-perl_versionnumber-1_all.deb
PLP with mod_perl

Installation with mod_perl is easy, just put these lines in your httpd.conf:
<Files *.plp>
  SetHandler perl-script
  PerlHandler PLP
  PerlSendHeader On
  PerlSetVar PLPcache On
And restart Apache.
PLP with CGI

First, create a directory for PLP. I'll use /foo/bar in examples, but something like /usr/local/lib/plp might be handier. In that directory, we put plp.cgi that is in the distribution (if you didn't use the tar.gz, you can find the script using "man PLP". Don't be alarmed, it's only three lines), and we make it executable.
mkdir -p /foo/bar
cd /foo/bar
cp ~/PLP-versionnumber/plp.cgi .
chmod 755 plp.cgi
Then, we add a bunch of configuration to httpd.conf:
ScriptAlias /foo/bar/ /PLP_COMMON/
<Directory /foo/bar/>
  AllowOverride None
  Options +ExecCGI
  Order allow,deny
  Allow from all
AddHandler plp-document plp
Action plp-document /PLP_COMMON/plp.cgi
Restart Apache to make it use the new settings.
Testing the PLP installation

We test by creating a simple test.plp file in our website directory.
<: print "It works!<BR>" for 1..10 :>
If that prints "It works!" ten times, you're set to go. If not, examing your error log for details (search for error_log or error.log if you don't know where to find it).