Search code examples
phpversionswitching

How to switch PHP version back and forth?


I installed LAMP manually on Ubuntu, let's say my current version of PHP is 5.2 and I want to switch to PHP 5.3 for awhile, is that possible? No xampp solution please.

Thanks


Solution

  • The most hassle free way would be to run it as CGI instead of using mod_apache. Then you can run both simultaneously by simply changing handler .php with a .htaccess or in a vhost.