Search code examples
phpmigrationvagrantphp4

Simulating old LAMP stack on local machine


I am currently working on legacy code, and I'm trying to find a way to recreate the server environment for this old site.

The site is written in PHP4, so I am having trouble working with it on my local machine, because I have PHP 5.5 installed for new development. The biggest problem is that the PHP5 clone function wasn't existent in 4, so the programmers wrote a function for it, however since Object are passed by reference in 5, the clone function is breaking all over the website.

We are also pushing this code back up to the same server with the same specs and I don't feel comfortable migrating the code to PHP5, especially since we are under time constraints.

I have looked into using Vagrant to set up an install with PHP 4 on it, but I can't find a way to get PHP4 and mysql4 onto the virtual server. I also can't find anything how to replicate the OS (it's red hat).

Any suggestions?


Solution

  • Probably overkill, but VirtualBox is always an option. Old versions of the OS aren't as easy to find as the newer ones, but bit torrent can be useful in that department.