Are you looking for a way to run additional PHP versions on Debian with ISPConfig? Our Server Management Services will help you with any queries or issues.
As it turns out, there is an easy way to get this done. Running several versions of PHP on a server is no longer a problem. Configuring the PHP instances will get you on the right path. Let’s find what our Support Engineers did to help one of our customers through the same issue.
How to run additional PHP versions on Debian with ISPConfig
Do you have more than one website on the server? If yes, you will probably need to run multiple versions of PHP parallelly. By the time you finish reading this article, you will have gained knowledge on how to configure PHP instances installed on the server with PHP-FPM and FastCGI modes.
Prerequisites to run additional PHP versions on Debian with ISPConfig
Here are a couple of things required before we proceed:
Configuration
First, we need to install a server that has the ISPConfig control panel. For instance, you can choose any one of these:
- Perfect server: Debian 8 (Jessie) v1.0
- Debian 8 (Jessie) v1.1: Perfect server
- Perfect server: Debian 9 (stretch) v1.0
- Debian 10 (Buster) v1.0: Perfect server
- Ubuntu 18.04 LTS v1.0: Perfect server
We recommend using Debian 10 for the best results.
PHP instances on hand
After that, the next thing you need to do is check the different PHP versions available on the server. in other words, these have to be configured on the ISPConfig interface with different path settings.
Configure custom PHP versions to run additional PHP versions on Debian with ISPConfig
Once the above-mentioned prerequisites are satisfied, we can move on to the next step.
Check available PHP versions to run additional PHP versions on Debian with ISPConfig
First, take a look at which PHP versions are available. Although you can choose to skip this step, we recommend checking. Run the following commands to check the available PHP versions:
ls -al /etc/php ls -al /run/php
The first command verifies the different PHP installation libraries while the second command verifies the socket files of the different versions required for PHP-FPM to work.
Create new PHP version in ISPConfig
Once the ISPConfig is available on the server, log in as Admin.
Then navigate to the System main menu, followed by the Additional PHP Versions menu.
Next, click Add new PHP version to bring up the new PHP form.
According to our Support Engineers, this option allows you to create and configure PHP versions as your requirements. The default PHP versions differ depending on the server’s version and distribution. Additionally, setting a custom version is deemed to be better as it keeps the configuration structure of the server clear.
Configure PHP 5.6: name tab
- Server: Choose the name of the server
- Client: Leave this blank if you are using clients
- PHP Name: PHP 5.6
- Active: kite
Configure PHP 5.6: FastCGI settings tab
-
- Path to PHP FastCGI binary: php cgi5.6
- Then, Path to php.ini directory: /etc/php/5.6/cgi
We would like to point out that you do not require an absolute path for the first value, as the php-cgi files are already in the directory.
Additionally, you do not require a / sign at the start or the end. However, the second value is an absolute path, so do not forget the /.
Configure PHP 5.6: PHP-FPM settings tab
-
-
- Path to PHP-FPM init script: php5.6-fpm
- Then,Path to php.ini directory: /etc/php/5.6/fpm
- Path to PHP-FPM Pool directory: /etc/php/5.6/fpm/pool.d
-
Similar to the first setup, the system tends to look for the init script in the directory automatically. Hence, you only need to enter the filename. For the next two options, you need to specify the directories with absolute paths though. Furthermore, they do not require a / sign. Last but not least, save the form.
Configure PHP 7.0/7.1/7.2/7.3/7.4
Next. We create a new PHP version and set everything the same way as the earlier one. Remember to replace x with the corresponding PHP version.
Name tab
- Server: Select the name of the server.
- Client: Leave it empty:
- Active: kite
FastCGI settings tab
- Path to PHP FastCGI binary php cgi7.x
- Then,Path to php.ini directory /etc/php/7.x/cgi
PHP-FPM settings tab
- Path to PHP-FPM init scriptphp7.x-fpm
- Then,Path to php.ini directory: /etc/php/7.x/fpm
- Path to PHP-FPM Pool directory: /etc/php/7.x/fpm/pool.d
[Need further assistance? Give us a call!]
Conclusion
Today, we learned how to run additional PHP versions on Debian with ISPConfig under the guidance of the experienced Support Engineers at Bobcares.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments