We still have got some more or less webapplications which are not compatible with PHP higher than version 5.2.x, which is the only blocker for the last Lenny servers to upgrade them to Squeeze.. I do not think that I am alone with this ****** topic :)
So the new “masterplan” is to deploy those applications on seperated Wheezy servers, with PHP 5.2.x running as FastCGI, so that most parts of the system are “security supported”.
First; I didn’t documented my steps and I am not 100% done (something like 99%) but I have done the following to have it “as clean as possible”:
- Catch the original 5.2.17 sources and build them, urgs.. it fails at all with the new multiarch paths from Wheezy, after a few hours of patching I gave up..
- Using dotdeb Lenny sources as reference, they also have got 5.2.17 sources, but what the fuck? The orig sources of their mirror also could not build, because the patch series FAILS (not hunky, they fail!), how did they build them???
- After some sanitizing of the dotdeb packages I thought it is better to smoke some cigarette and to delete them, urgs..
- My next step was to catch the latest 5.2.12-x packaging from snapshot.debian.org, here the story continues… again…:
PHP 5.2.x is just not able to detect the new multiarch paths, it fails at most “dir” options. Since patching the whole build system would be *too* much work I decided to hack around this (ln -s /usr/lib/x86…./foo.so /usr/lib/), then some adjustions to the build dependencies, disablieng some modules, like SSL and libdb (incompatible versions), disabling merged patches and refresh the suhosin hardening patch; I get an working PHP 5.2.17 package on Wheezy.
But this is too easy!
I want packages which I could co-install with the PHP 5.4 packages from Wheezy, 5.2 should only used withing vHosts where I have enabled them..
So I rewrote the whole packaging (*burg* IMHO at all) to use “php52” instead of “php5” as packaging namespace and also everything is put into “/opt” as prefix. Much painfull work, but yeah it works.. :)
Some packages, like php52-dev or php-pear are broken, but those were not my goal of this action.
If someone is interested in those packages please send me an email.
Since PHP 5.2 is not supported any longer (and that this is at all a big hack) I will not publish the source and binaries at all.
Hi,
Thanks for sharing your experience, it was an interesting read for me.
I’m not at all surprised by the low quality of the packages from dotdeb. It has always been the case that they have packages with problems, and it’s been many years like this.
But I’m surprised that your PHP apps can’t be upgraded to run with 5.3.x. It is normally very easy to fix the problems in them, usually it is just a mater of either not displaying the deprecation warnings, or just replacing ereg by preg or the like. In any ways, it doesn’t, IMO, justify continuing to run PHP 5.2.x, which doesn’t have any security support. The move to PHP 5.4.x is another mater, because deprecated functions in 5.3 are now simply removed.
Also, one of the ways to run your old applications in a PHP 5.2, but keeping your system up-to-date, is to use a chroot system. PHP-FPM does that, but also SBOX, which I maintain (both in Debian and as upstream). I use that plus AUFS so that I can maintain a single operating system template for multiple sites. The advantage is that you don’t need to bother with doing some php52 tricks like you wrote above.
Anyway, I am interested by your PHP 5.2 packages. Would you be able to share them? If so, please send me a mail (zigo is my Debian id…).
Cheers,
Thomas
I am interested too in the package.
my email is in the registration, or daniele at linux.it
Thanks,
Daniele
Pingback: What an ugly (PHP) work.. | Blog of Patrick | Internet blog
Hi,
It sounds like an awesome hack. :p Could you please send me the package?
Thank you very much in advance!
Cheers,
Elyse.
Hi Patrick
Please send me the package? I’ve been wrestling with a problem like yours but haven’t found a solution. Until now? :)
Cheers,
Søren
Thanks, you have got mail :)
Hi,
I have exactly same problem. You gave me hope that it could be resolved :) Could you please send me the package also.
Thanks!
Hello!
What a luck! I haven’t hoped that anyone made such a solution for this problem.
Could you please send me the package.
Thanks a lot!
Thanks, I have sent you an e-mail :)
my i have a copy of this package also? im trying to use
https://code.google.com/p/php52-backports/ this patch
on the oficial 5.2.17 version
on debian Wheezy
mullerivan@gmail.com
cheers
Hi,
I’ve also some applications that require PHP 5.2.
Could it be possible to send me the package?
Thanks!
I have to install php52 on wheezy server (no comment…), I’m trying to rewrite all the debian/rules file because i would like to have some “clean” packages with their namespace (php52-cgi and similar). So, can you send me your source file? thanks :)
k.
I forgot one thing… my email is kionez-at-gmail-dot-com ;)