Running PHP 5.1 and 5.2 on same server


I might have overlooked it, but is there a way to run different php 5 version as fcgi on a server? How can this be done with virtualmin?

I had some installations on my last server that would need 5.1.x not 5.2. If I’m understanding correctly, using php as fcgi should allow this.

Of course each vhost can only support one version of php 5.

That’s getting a little complicated…and I’ve never met an application that would run in 5.1 that wouldn’t also run in 5.2. But it is possible. It won’t be automatic, because Virtualmin knows about php4 and php5, but can’t (easily) be taught about php5 vs. php51 or whatever.

To do this, you’d need to manually modify the fcgi wrapper scripts found in /home/domain/fcgi-bin to point to a different installation of PHP. You’d need to do a /usr/local/php-5.1 style installation and keep them completely separate for safety/sanity (keeping 4 and 5 installed simultaneously in the standard locations is already a little tricky).

Hi Joe,

thanks for your reply. I agree with your view that any php 5.1 script should work in 5.2, but there are some problems like JSON being part of 5.2 but not in 5.1 â