setupphp
Setup Multiple PHP
This document provides the procedure to install and set up multiple php versions on your eenos hosting control panel. Eenos builds and maintains different php versions.
The EOL php versions provided by eenos are packed with security backup ported patch fixes. We will keep those versions as long as the patches are available.
We recommend using your PHP versions that are actively developed and maintained by the PHP development team.
The installer command and options are below,
Command:
/usr/local/eenos/scripts/setupphp
Command Options:
Usage: /usr/local/eenos/scripts/setupphp <option>=[value]
Command Groups:
Options:
-s, --search , search : Show available php versions for installations
-l, --list , list : Show installed php versions
-i <php> , --install <php> , install=<php> : To install an eenos php version
-r <php> , --remove <php> , remove=<php> : To remove php from server
-d <php> , --default <php> , default=<php> : Set the default php on server
-b , --buildphpconf : To rebuild and update the php.conf in
apache httpd server
-dh <handler> , --defaulthandler <handler> : To set the default php handler
-ph <php> <handler> , --phphandler <php> <handler> : Change the handler of a php version
Search PHP Version For Installation
To find all eenos provided php versions, use the following command,
/usr/local/eenos/scripts/setupphp -s
eenos-php56 - Eenos PHP56 complete package
eenos-php70 - Eenos PHP70 complete package
eenos-php71 - Eenos PHP71 complete package
eenos-php72 - Eenos PHP72 complete package
eenos-php73 - Eenos PHP73 complete package
eenos-php74 - Eenos PHP74 complete package
eenos-php80 - Eenos PHP80 complete package
eenos-php81 - Eenos PHP81 complete package
Install PHP Version
To install a php version, please use the following command.
/usr/local/eenos/scripts/setupphp -i <php>
Example: Install PHP version 8.1 ( here, eenos-php81 )
/usr/local/eenos/scripts/setupphp -i eenos-php81
Remove PHP Version
To remove a php version from the server use the following command, ( here, version eenos-php81 )
/usr/local/eenos/scripts/setupphp -r eenos-php81
Default PHP
To set up a default php version for the eenos server, use the following command.
/usr/local/eenos/scripts/setupphp --default <php>
Example: Setup php 8.1 as default php of server
/usr/local/eenos/scripts/setupphp --default eenos-php81
Default PHP Handler
Eenos supports CGI, fcgi, suphp, and fpm php handlers for the Apache httpd server. The nginx uses fpm and OpenLiteSpeed uses the lsphp handler.
Use the following command to set as default php handler
/usr/local/eenos/scripts/setupphp -dh <handler>
Example: To set up SuPHP as the default handler
/usr/local/eenos/scripts/setupphp -dh suphp
Setup Handler For a Specific PHP Version
You can set up different handlers for any php version on the eenos server. Use the following command to setup a php handler on a specific version,
/usr/local/eenos/scripts/setupphp -ph <php> <handler>
Example: Setup cgi php handler on php 8.1 version
/usr/local/eenos/scripts/setupphp -ph eenos-php81 cgi
List All Installed PHP Version
To view the installed php version, handlers and default php of the server use the following command
/usr/local/eenos/scripts/setupphp -l
Package Group Version Handler Available Handlers
.....................................................................
eenos-php71 php71 7.1.33 suphp cgi,fcgi,suphp,fpm
eenos-php72 php72 7.2.34 suphp cgi,fcgi,suphp,fpm
eenos-php73 php73 7.3.33 suphp cgi,fcgi,suphp,fpm
eenos-php74 php74 7.4.33 suphp cgi,fcgi,suphp,fpm
eenos-php80 php80 8.0.26 suphp cgi,fcgi,suphp,fpm
eenos-php81 php81 8.1.13 suphp cgi,fcgi,suphp,fpm
.....................................................................
Default PHP : eenos-php81
Default php handler : suphp
Rebuild Apache PHP Configuration
This command will rebuild the Apache php configuration file located on /etc/httpd/conf.d/php.conf,
/usr/local/eenos/scripts/setupphp --buildphpconf