Add an alternative PHP version

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

The first file add a new row in Settings → Features and described the form in Settings → Features → Edit. For example: 

/usr/local/mgr5/etc/xml/ispmgr_mod_myphp.xml
<mgrdata>
 <lang name="ru">
   <messages name="feature">
     <msg name="dname_altphp72">Alternative version PHP 7.2</msg>
   </messages>
   <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>
   </messages>
 </lang>
</mgrdata>

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

/usr/local/mgr5/etc/xml/ispmgr_features.d/my_php.xml
<features>
       <feature name="altphp72" featuregroup="altphp">
		<packagegroup name="altphp72gr" type="select">
			<package name="ispphp72" dispname="PHP 7.2 CGI" primary="yes" recommended="yes">
				<systemname>isp-php72</systemname>
			</package>
			<if value="turn_off" hide="package_ispphp72_mod_apache" shadow="yes"/>
			<if value="turn_off" hide="package_ispphp72_fpm" shadow="yes"/>
		</packagegroup>
		<package name="ispphp72_fpm" dispname="PHP 7.2 PHP-FPM" recommended="yes">
			<systemname>isp-php72-fpm</systemname>
		</package>
		<package name="ispphp72_mod_apache" dispname="PHP 7.2 Apache module">
			<systemname>isp-php72-mod-apache</systemname>
		</package>
	</feature>
</features>
 View details

<systemname>isp-php72</systemname> — a package name in the package manager.

<package name=”ispphp72″ dispname=”PHP 7.2 CGI” primary=”yes” recommended=”yes”> — package description for CGI.

<package name=”ispphp72_fpm” dispname=”PHP 7.2 PHP-FPM” recommended=”yes”> — package description for PHP-FPM.

<package name=”ispphp72_mod_apache” dispname=”PHP 7.2 Apache module”> — package description for the Apache module.

Note

If packages for PHP-FPM and Apache are not present you may not include them into the description.

The /opt/<package name>/etc/php.ini file must be added when the package is installed.

Restart ISPmanager after you have added the XML-files:

/usr/local/mgr5/sbin/mgrctl -m ispmgr exit
info@mustanhost.com
8.00-20.00