I've got a production server running older websites running on a Debian Jesse machine with PHP package 5.3.3-7+squeeze26. I have a development machine set up with a newer PHP package (5.6.29-0+db8ul) running in VirtualBox. When I import one of the old websites and try to run it on the development machine, I get PHP errors like: php Call-time pass-by-reference has been removed.

My development machine is running phpmyadmin and apache which, I assume, rely on the newer version of php. So what are my options for getting these older website running on the development machine?

a) Can I run two versions of php side by side on the machine and have this website run on the older version?

b) Should I uninstall current version of php on development machine and run it off an older version of php5? In this case, what do I do about apache2 and phpmyadmin? Do those have to be rolled back, too?

c) Should I just set up a new virtual machine with an old version of php? Though this is probably the best option and the one I'm leaning toward, I'm still curious to know if options a and b are possible.

  • 1
    a) yes, see answers here and here. b) you can do this; apache2 does not need to be an old version, as for phpmyadmin you should check which php version it requires. 3) you can go this way it's more convenient for you. Lastly, you could consider applying a quick fix in order to prevent the errors you have. – simlev Apr 9 '17 at 22:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.