First upgrade your software as is.
>> sudo apt-get update
>> sudo apt-get upgrade
Then add the following to your /etc/apt/sources.list file.
>> sudo nano /etc/apt/sources.list
deb http://http.us.debian.org/debian stable all deb http://security.debian.org/ stable/updates main contrib deb http://packages.dotdeb.org/ stable all
Finally
run the update to install PHP 5.2.9.
>> sudo apt-get update
>> sudo apt-get install php5-cli
>> sudo /etc/init.d/apache2 restart
Err http://http.us.debian.org stable/all Packages
404 Not Found [IP: 204.152.191.39 80]
after nano /etc/apt/sources.list change
apt-get update gives the error:
W: Failed to fetch http://http.us.debian.org/debian/dists/stable/Release Unable to find expected entry all/binary-i386/Packages in Meta-index file (malformed Release file?)
I think the version is no longer supported. Try later 10.4 onwards updates
Don’t run this if you’re on a modern version of Ubuntu. It will mess things up. :/