Am 22.04.2016 um 22:17 schrieb Good guy:
Or if there is an option then use Windows to host multiple php versions. I use them all the time on my development machine that is running Windows 10 and IIS. you just need to make sure you have the correct VC++ run time libraries. You can download them from Microsoft Website (VC9, VC10, VC11/12, VC14).

This, as other comments given, does not answer the OP's question. IMHO, the comment to the OP's question should have been only:

I agree, the old code should to be migrated to run on latest PHPs.

If someone is really interested in helping he or she should write about how the OP could accomplish his original task (PHP 5.2, CentOS, Apache 2.4.6). No doubt there are plenty of solutions for the OP's problem, like sticking to the Windows world or lots of shiny Linux tech stuff and - no doubt - they all have their pros and cons. But without inert knowledge of the requirements of the project at hand you don't know, whether your suggestions are helpful or pointless. (I guess he migrates from Windows to CentOS for a reason and I guess that he also has his reason to use PHP 5.2).

Please don't missunderstand me: I share the opinion that a solution with up-to-date and supported software would be the way to go in a perfect world. Alas - ours isn't one.

As to the question: You can always build your favorite version of your open source software, well, from the sources (which means: Not using the PHP of your distribution but building your own binaries). But - the older your targeted version is and the bigger the gap between the devel-libraries of your current OS and the targeted version is, the bigger will your pain be. This means: A lot of work.

In this answer I totally ignore security issues at hand - you'll have to deal with them, but you should know from the comments of the others, that there is a considerable risk in running non-patched software that is long out of support.

You could consult this article if you really want to stick to your requirements and if you consider compilation as an alternative: http://www.phpinternalsbook.com/build_system/building_php.html - this is no guarantuee that its contents will comply with the rather old PHP-version (Disclaimer: Its the articles' google rank that made me recommend it, I just skimmed it, didn't read it).

Depending what your further requirements are you have to decide how you want to "connect" httpd and php, your choices are mod_php (which is fine if you only use it for one purpose) or any sort of fcgi-Module (I guess mod_fcgid is your best bet). Fcgi is better if separation of rights (multiple concurrent php-applications which should be separated from each other) is of a concern. Otherwise you should stick to mod_php which is easier to implement and configure ("easy fcgi" from the php side is only possible if you use php-fpm which is only supportet in php 5.3 and above). Whether CentOS has these modules in their package repositories is unknown to me, but if not, you can still compile httpd from the sources with your own flavor of version support and modules (which will be even more work for you).

Alternatively you could search whether some unofficial repo provides php 5.2 for CentOS. But this also has considerable risks (the software is probably not up to date or the provider hasn't to be trusworthy).

Maybe this gives you some ideas how to proceed (i.e. what to google next).

Kind Regards,
Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to