How to install a sandboxed version of PHP 5.3 (so I can still use an older version of PHP)?
772
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)?
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.
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.
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 libsI 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.
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.
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