PHP5-CGI on Debian Lenny

 

Debian OpenLogo

This is a story all about how, my life got twist turned upside down – by PHP5-CGI on Debian Lenny.

The documentation on this isn’t the best, so here’s how I was able to get PHP5 running.

 

All commands are assumed to be run as root.

 

apt-get install php5-cgi

Installs PHP5-CGI, obviously.

 

vim /etc/apache2/sites-enabled/example.com

Add in the following 3 lines, save and quit

 

  ScriptAlias /php5-cgi /usr/lib/cgi-bin/php5
  Action php5-cgi /php5-cgi
  AddHandler php5-cgi .php

 

a2enmod actions

Enables Actions, above

 

/etc/init.d/apache2/reload

Reloads the apache configurations, and you should be good to go!