WebHostingPeople Blog

  • Domains
    • Shared Hosting

  • Cloud VPS
  • Servers
    • Client Area Login

How Can We Help?

Enabling Multiple PHP versions On DirectAdmin

You are here:

It’s handy to have a number of PHPs in a server. DirectAdmin management panel has this function obtainable. With this, you possibly can have legacy PHP variations to the newest secure variations. This can enable the server to assist legacy software program together with the newest software program.

This may be achieved through the use of the CustomBuild device which is the built-in device which lets you set up, take away, and recompile packages from supply. Because the set up requires the recompilation of the supply code, it’s advisable to take the backup of the server recordsdata. Make sure that CustomBuild is up to date to model 2.0.

 

1) Reconfiguring the CustomBuild 2.Zero configuration

This may be carried out in two methods by instantly accessing the configuration file of CustomBuild and enhancing the configuration file for the brand new configuration to take impact. The configuration file of CustomBuild is ‘choices.conf’. The next instructions will result in the configuration file choices.conf for enhancing the file.

#cd /usr/native/directadmin/custombuild

#vi choices.conf

The alternate means of doing that is to make use of the command line methodology the place particular scripts are used to vary the configuration recordsdata. This methodology is safer as pointless errors in configuration syntax may be averted. Run the next instructions for altering the configuration file.

 

2) Selecting the PHP variations

#./construct set php1_mode php-fpm

#./construct set php2_mode php-fpm

#./construct set php1_release 7.0

#./construct set php2_release 5.6

These instructions enable each PHP 7.Zero and PHP 5.6 on the server and php-fpm. PHP-fpm should be chosen whereas utilizing Nginx and Apache reverse proxy. In case you are not utilizing the reverse proxy arrange, php mode may be modified. If it’s essential to confirm these adjustments ,you possibly can view it within the choices.conf file.

Be sure you use PHP variations above 5.6. Older variations have reached finish of life and should not maintained and up to date.

 

3) Recompiling the up to date configurations

Now now we have modified the configuration and must recompile the PHP. You might want to rewrite the configurations for the brand new configurations to take impact. The next instructions will do the identical.

#./construct php n

#./construct rewrite_confs

Since this course of can take time run these instructions in display. This prevents community failure from interrupting this course of.

 

4) Configuring PHP variations for Web sites

Now it’s time to pick the PHP model for particular person web sites.

Enable Multiphp

So as to alter the PHP model of internet sites navigate to the person degree, choose the area identify, click on ‘Area Setup’ beneath the account you have got. Now select the area identify and click on on it. Scroll down to vary the PHP model. There shall be a delay of some minutes to course of the adjustments because it requires a webserver restart.

Post Your Comment