Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Our development server is running Ubuntu with PHP 5.2.14. I need PHP 5.3 to try out the Behat library. How can I install PHP 5.3 to satisfy Behat, but keep PHP 5.2.14 as the default PHP version (so our web apps doesn't break)?

share|improve this question
    
Are you open to running a second apache instance on that system, or are you expecting to load two different versions of PHP into a single instance of apache? –  MadHatter Oct 21 '10 at 6:26
    
I'm open to the idea. –  Andrew Oct 21 '10 at 19:41
add comment

4 Answers

just install it into your home directory in a unique path...e.g.

./configure --prefix=/home/you/php-testing

now do make && make install, and then add a new high-numbered port listener for apache which uses the locally installed php libs

share|improve this answer
    
Hi brad. I did the first part, but how can I the "add a new high-numbered port listener for apache which uses the locally installed php libs". Please extend your answer or point to me a tutorial that will solve my problem. Thx a lot. I'm using Fedora 17. –  GarouDan Aug 28 '12 at 19:31
add comment

I would suggest running a virtual ubuntu lucid (10.10) with the newer PHP 5.3 Version in it. Use KVM with virt-manager or just virsh via libvirt-bin package. This seems much easier to me than to self-compile and install a php5.3 in your productiv ubuntu 10.4 Webserver. (I didn`t found a php5.3 in the backports)

The big advantage is the much nicer upgrade option - I love virtual machines for this. I take a snapshot and run the machine local. When the upgrade is fine, I do it on the production machine.

A second option could be to download the source-package of php5.3 from Ubuntu 10.10, change the build-prefix, saisy the build-dependencies and change the debian/control file (package collisions!). This is a hack and you will have problems on upgrade. Ok, If you are firm with ubuntu/debian package management you could master it.

But I would strongly suggest to run a second (virtual) webserver.

share|improve this answer
add comment

Couple years ago I wrote a short how-to on running both PHP4 and PHP5 on Windows: https://forums.dathorn.com/showthread.php?t=2884

Just change the Windows paths to Unix and modify the version numbers and it should work.

share|improve this answer
add comment

Use an usb stick with portable apps from http://portableapps.com/ and XAMPP. So you have a complete separated test environment.

After inserting the stick it will load the portableapps menu. you'll find the xamp startprogramm where you have simple start/stop buttons for apache and mysql.

You can find details at http://portableapps.com/apps/development/xampp

share|improve this answer
    
Can you elaborate a bit, and explain how it would be done? –  Andrew Nov 2 '10 at 15:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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