mod_fastcgi multiple php version
05-16-2017, 01:20 AM
(This post was last modified: 05-16-2017, 05:37 PM by berry9mathew.)
Hi devs,
I've been using Sentora for a few years now and it was becoming increasingly more difficult to run sites on my server because of the PHP constraint.
I was wondering whether or not it is possible to upgrade sentora to enable a dropdown in the domain listing pages to change the PHP version of a website.
Looking at it, with a little thought and effort this seems doable.
Ways to do it?
The way I see it being done is as follows:
It is also a cause for concern because it will be a major switch from PHP to PHP-FPM.
I think this feature will be very useful since many sites are upgrading to PHP7.1 and others are left to rot on PHP5.6.
With that being said it will be very difficult to upgrade to newer versions without suhosin, until that is released this project is kind of a sitting duck.
I've been using Sentora for a few years now and it was becoming increasingly more difficult to run sites on my server because of the PHP constraint.
I was wondering whether or not it is possible to upgrade sentora to enable a dropdown in the domain listing pages to change the PHP version of a website.
Looking at it, with a little thought and effort this seems doable.
Ways to do it?
The way I see it being done is as follows:
- Check the servers php version and make not of this.
- Backup all php configuration files for easy revert later if needs be
- Backup vhost file just incase something screws up
- Remove all versions of php on the machine
- Clean up the configs (so not to leave any garbage)
- Install/Enable mod_fastcgi
- Install the cgi scripts ready
- Allow the install script to offer which versions of php install so not to overload the system with PHP versions which aren't necessary (PHP5.6 and PHP7.0 should be defaults)
- Run a command or something similar to update the vhosts.
- Create and update a php_versions table in the database with the installed versions
- Add a new column to the domains table with a php version id (Makes life easier when figuring out what version is being used when it comes to updating the php version )
- Add a new inline form field to: domains, sub domains and parked domains (?) which enables the user to select a PHP version
- Done? I think.
It is also a cause for concern because it will be a major switch from PHP to PHP-FPM.
I think this feature will be very useful since many sites are upgrading to PHP7.1 and others are left to rot on PHP5.6.
With that being said it will be very difficult to upgrade to newer versions without suhosin, until that is released this project is kind of a sitting duck.