2

This question has been on my mind for quite some time. Although I don't really expect a solution, maybe someone can at least tell me why.

I've been running multiple PHP versions in parallel with mod_fcgid on webservers for a long time. Unfortunately I always had to compile all but one (the "system version") of them myself. I can do that, no problem. I only wonder why there are no PHP packages from "trusted" sources that can be installed alongside each other. I think running PHP as cgi is quite common these days, so having distinct paths for different PHP versions would seem obvious to me. I can see why big vendors (red hat, debian) won't do that, but why don't repositories like dotdeb (debian) or ius (centos) package their PHP versions this way?

1
  • I came here to ask a similar question tonight. I'm increasingly needing to keep some sites on older versions of PHP while running others on 5.5+, and it's a pain to compile all bar one (I use Ubuntu). We can't be the only ones with this issue. – PeterB May 6 '14 at 21:13
1

Repositories always contain the latest versions for security reasons. That's the short answer really. There are exceptions to every rule of course since there can be multiple "stable" versions of a given software, but usually there's just one because it would be too cumbersome to manage multiple versions.

Besides, PHP 5.5 is the version you should be running, and 5.4 only if you have some applications that require it. 5.3 shouldn't be used at all because it hasn't seen an update in about 6 months and is end-of-life.

4
  • ius repository for centos has php53, php54, php55 at the same time. would you forcefully upgrade a customers php version? – matthias May 6 '14 at 12:15
  • For shared hosting, the philosophy is a bit different and it is possible to run multiple versions of PHP. The repo has multiple versions, but PHP in particular doesn't have version-specific folder structures because in 99% of cases you don't need multiple versions. If it was for the sake of security of my other customers, I would certainly force an upgrade. – Nathan C May 6 '14 at 12:18
  • it's this "in 99% of cases you don't need multiple versions" i can't believe. but it's ok, maybe i'm wrong. if there was the need, people/repositories would build those packages – matthias May 6 '14 at 12:47
  • Well, as you pointed out some repos do have multiple versions, but PHP wasn't designed with multi-versioning in mind so the packages will overwrite each other. You could always roll your own .rpms from source with the appropriate paths if you really wanted to. – Nathan C May 6 '14 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.