Ispmanager 6 lite, pro, host documentation

Add an alternative PHP version

To add an alternative PHP version in ispmanager, you need to create two XML-files.

The first file adds a new row in Settings → Software configuration and describes the form in Settings → Software configuration → Edit. For example: 


 <lang name="ru">
   <messages name="feature">
     <msg name="dname_altphp72">Alternative version PHP 7.2</msg>
   <messages name="feature.edit">
     <msg name="package_ispphp72">My PHP 7.2</msg>
     <msg name="hint_package_ispphp72">Use PHP 7.2 as CGI</msg>
     <msg name="package_ispphp72_mod_apache">PHP as Apache version 7.2</msg>
     <msg name="hint_package_ispphp72_mod_apache">Use PHP 7.2 as an Apache module</msg>
     <msg name="package_ispphp72_fpm">PHP 7.2 for PHP-FPM</msg>
     <msg name="hint_package_ispphp72_fpm">Use PHP 7.2 as PHP-FPM</msg>
     <msg name="packagegroup_altphp72gr">PHP 7.2</msg>
     <msg name="hint_packagegroup_altphp72gr">Use PHP 7.2</msg>

The second file descrbes the package of the PHP version you want to add. For example:


       <feature name="altphp72" featuregroup="altphp">
		<packagegroup name="altphp72gr" type="select">
			<package name="ispphp72" dispname="PHP 7.2 CGI" primary="yes" recommended="yes">
			<if value="turn_off" hide="package_ispphp72_mod_apache" shadow="yes"/>
			<if value="turn_off" hide="package_ispphp72_fpm" shadow="yes"/>
		<package name="ispphp72_fpm" dispname="PHP 7.2 PHP-FPM" recommended="yes">
		<package name="ispphp72_mod_apache" dispname="PHP 7.2 Apache module">
View details
If packages for PHP-FPM and Apache are not present you may not include them into the description. The /opt//etc/php.ini file must be added when the package is installed.

After adding XML files:

  1. Restart ispmanager:
    /usr/local/mgr5/sbin/mgrctl -m ispmgr exit
  2. Install the new PHP version in SettingsSoftware configuration.

When adding an alternative version of PHP, ispmanager:

  1.   Installs the required packets and adds records to the database.

    Example of adding records to DB

    INSERT INTO ispfeatures (id, name) VALUES('1', 'altphp90')
    INSERT INTO isppackages (id, ispfeatures, isprimary, name) VALUES('1', '1', 'on', 'ispphp90')
    INSERT INTO isppkginfo (feature, id, name, sysname, pkgstate, priority) VALUES('altphp90', '58', 'ispphp90_fpm', 'isp-php80-fpm', '33', '1000');  //For PHP_FPM
  2. Adds the PHP version path to the configuration file. For example, for PHP 9.0, the control panel will add the parameter isp-php90_cgi-bin with the value of /opt/php90/bin/php-cgi.

If the alternative version of PHP has been installed successfully, at startup the control panel will add to the log file /usr/local/mgr5/var/ispmgr.log a record in the following format:

Example of a log file record

Dec 30 07:40:58 [2129952:1] php INFO Registering PHP module 'isp-php90'