LAMP stack that provides specific LAMP versions

Asked by Sean Lentner

I need to build an Ubuntu server with the following LAMP version, I have failed to find a Ubuntu version that has all the versions I need without either backporting or downgrading with app-pinning. Could someone point me to some sort of howto or document on how to gets these all on one system?

Linux Ubuntu
PHP v5.2.9 - 5.2.16 is OK
OpenSSH p4.8 or later (needs to support SFTP Chroot)
Apache2 - no requirement
mySQL - no requirement

thanks in advanced

Question information

English Edit question
Ubuntu php5 Edit question
No assignee Edit question
Solved by:
Sean Lentner
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :

All current version of ubuntu use SSH 5. However, all ubuntu versions currently use php 5.3. Is there any reason why you need a lower version of PHP? It would be bad to run an internet facing php server that you were not backporting fixes for.
# lucid (php): 5.3.2-1ubuntu4.9 [security]: all
# lucid-updates (php) 5.3.2-1ubuntu4.9: all
# maverick (php) 5.3.3-1ubuntu9.5 [security]: all
# maverick-updates (php): 5.3.3-1ubuntu9.5: all
# natty (web): 5.3.5-1ubuntu7.2 [security]: all
# natty-updates (web): 5.3.5-1ubuntu7.2: all
# oneiric (php) 5.3.6-11ubuntu1: all

You could theoretically have 2 php's side-by-side, but it is probably easier to see if you can relax your requirements for php,

Its possible to install an older, unsupported version of ubuntu -- but this would be a bad idea (tm), as the repositories have been taken offline.

Revision history for this message
Sean Lentner (t-sea7-l) said :

Thanks for the information, unfortunately my web dev has a few sites still running on php 5.2.x that he hasn't had a chance to upgrade to 5.3 for various reasons (mostly it breaks ALOT of stuff). I had a slick natty install but I could go down to php 5.2. I couldn't find a parallel install guide either which I would have gladly done.

Revision history for this message
mycae (mycae) said :

You could try a PPA, such as this one:

but remember that apt-get will probably want to update it at the first opportunity, and that if you require any php-dependant packages from the main archive, it will not be necessarily compatible with this lower versioned php. Even small desktop programs may use php as their back-end, so you would probably only get away with this on a lightweight desktop, or a headless server install.

You probably want to pin php5.2 as well, to prevent it being upgraded.

Revision history for this message
Sean Lentner (t-sea7-l) said :

I ended up pinning the PHP under /etc/apt/preferences.d/php and added karmic source list under /etc/apt/sources.d/

Revision history for this message
mycae (mycae) said :

Whilst apt won't stop you using an old sources -- that's not a particularly good solution.

Mixing ubuntu builds means you are using different library interfaces simultaneously -- you may get symbol breakage which will manifest itself as random crashes when calling certain library functions.