Install php5 php5-fpm and nginx on Debian 5 Squeeze

In many tutorials I’ve seen that you should use dotdeb packages like this:

vim /etc/apt/sources.list.d/php-fpm.list

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

I tried and had many errors E: dependency not statisfied among other things. With aptitude, everytime I wanted to install php5 it would remove php5-fpm etc.

So, I went on the [http://www.dotdeb.org/instructions/](dotdeb website) and there is the magic.

For Squeeze and php5 those are the sources we need:

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