PHP

Dépôts

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5 libapache2-mod-php5

Dépôts dotdeb

deb http://packages.dotdeb.org squeeze-php54 all
deb-src http://packages.dotdeb.org squeeze-php54 all

Et retirer
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

FastCGI

http://www.lolart.net/blog/ez-publish/php-fastcgi-fpm-et-apache

aptitude install apache2 apache2-mpm-worker libapache2-mod-fastcgi
a2enmod fastcgi
vim /etc/apache2/mods-available/fastcgi.conf
<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcgi
  FastCgiIpcDir /var/lib/apache2/fastcgi
  FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -maxProcesses 10 -maxClassProcesses 1
  AddHandler php5-fcgi .php
  AddType application/x-httpd-php .php
  ScriptAlias /cgi-bin/ /var/www/cgi-bin/

  <Directory "/var/www/cgi-bin">
    Options +ExecCGI
    SetHandler fastcgi-script
    Order Deny,Allow
    Allow from env=REDIRECT_STATUS
  </Directory>

  # PHP 5.3 + FPM par defaut
  <Location "/cgi-bin/php53.fpm">
      Order Deny,Allow
      Deny from all
      Allow from env=REDIRECT_STATUS
  </Location>
  FastCgiExternalServer /var/www/cgi-bin/php53.fpm -host 127.0.0.1:9000
  Action php5-fcgi /cgi-bin/php53.fpm

</IfModule>