2

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)?

Andrew
  • 3,293
  • 8
  • 32
  • 35

4 Answers4

3

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

Brad Clawsie
  • 411
  • 2
  • 7
  • 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
1

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.

ThorstenS
  • 3,084
  • 18
  • 21
0

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.

djn
  • 130
  • 4
0

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

wurlog
  • 303
  • 1
  • 4
  • 17