1

I have an Apache 2.2.3 installation with default php (installed as a module) 5.1.6, on a CentOS distribution. Php and Apache were installed using yum install command. My document root is located under var/www/html folder. I have now to install a new website that requires Php 5.3 +; but i can't simply upgrade current php installation, else all current websites will break.

I downloaded and compiled php 5.4.4 and installed. It works too using it's built in web server.

I would like now to create a folder var/www/html/myfolder in which Php 5.4.4 should be used. All other websites should continue to use php 5.1.6; but really i do not know how to make this.

migrated from stackoverflow.com Jul 15 '12 at 22:07

This question came from our site for professional and enthusiast programmers.

  • Search on Google first, this subject has been discuted many many times ... – j0k Jul 14 '12 at 17:59
  • I did, and followed also some tutorials; but noone for now worked. I'm just asking for the right way, not "ready to use solution" – Vincenzo Jul 14 '12 at 18:02
1

You can install PHP 5.3 on your existing CentOS 5 system by using the vendor-provided php53-* packages instead of the corresponding php-* packages.

  • That would be nice; are we sure it won't upgrade current installation? Edit: As i thought, system is not happy about that: php53-common-5.3.3-13.el5_8.i386 from updates has depsolving problems --> php53-common conflicts with php-common Error: php53-common conflicts with php-common – Vincenzo Jul 16 '12 at 19:41
1

I use PHPFarm for precisely this sort of situation, and it seems to work just fine after some configuration shenanigans. Spoiler: you have to download and compile the older version of PHP from the PHP Museum site. I'm not sure you can have two or more versions of PHP installed as Apache modules on a server.

0

There are many tutorials for this on the web. I see in a comment that you tried some and that none worked, but what exactly didn't work? I guess the tutorials always worked for the author of the tutorial, so it will usually be a working method. Without any info on what you tried and what went wrong in your attempts, we can't really describe "the right way".

I would comment this, but there is no button to add a comment (too low reputation I guess?).

  • You can comemnt upon reaching 50 reputation. This is pretty easy to do. – Michael Hampton Jul 15 '12 at 22:39
  • I figured, but since I can't I still wanted to provide my feedback. At least I tried to provide useful feedback so that the OP can reformulate his question later. If you upvote me I can maybe do this next time :P – Luc Jul 15 '12 at 22:41

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.