Ubuntu – Install php 5.3.10 in ubuntu 12.04

installationPHPphp5Ubuntuubuntu-12.04

I have been trying to downgrade the php version from php 5.4 to php 5.3. I tried removing php5, purging php5 and then reinstalling using "apt-get install php5=5.3.6-13ubuntu3.6", but it did not help, I get a message saying "E: Version '5.3.10-1ubuntu3.3' for 'php5' was not found". Is there a way I can install php 5.3.10 in ubuntu 12.04?

I am using amazon ec2 instances,

Best Answer

if you get the reply that some version was not found, it probably wasn't in the repository.

try doing apt-cache search php5 to see what versions are available.

Otherwise, if there is no package available, you could add the http://www.dotdeb.org/ repository by doing this: sudo echo "deb http://php53.dotdeb.org stable all" >> /etc/apt/sources.list. Then another apt-get update and then you should have a php5.3 package available.