- Register the new PHP version in Plesk:
# /usr/local/psa/bin/php_handler --add -displayname <NN> -path <path to php cgi> -phpini <path to php.ini> -type <php handler> -id <NN-custom> -clipath <path to php cli>
where
- -displayname <NN> is the PHP version name that will be shown in the Plesk UI. We recommend that you include the version number in the displayname, for example, you can name the version "5.3.3-custom".
- -path <path to php cgi> is the location of the PHP CGI binary file. You can find this in the output of the command make install in the line Installing PHP CGI binary. For example, if you see the line Installing PHP CGI binary: /usr/local/bin/, the location you need to specify is /usr/local/bin/php-cgi. Learn more at http://php.net/manual/en/install.unix.commandline.php.
- -clipath <path to php cli> is the location of the PHP CLI binary file. You can find this in the output of the command make install in the line Installing PHP CLI binary. For example, if you see the line Installing PHP CLI binary: /usr/local/bin/, the location you need to specify is /usr/local/bin/php. Learn more at http://php.net/manual/en/install.unix.commandline.php.
- -phpini <path to php.ini> is the location of the php.ini file, for example, /some/path/php.ini .
- -type <php handler> is the type of the PHP handler associated with this version. Learn more about PHP handlers in the section PHP Handlers.
Note: Important: Either the CGI or FastCGI PHP handler can be set. mod_php is not supported.
- (Optional) -id <NN-custom> is the identifier that you will use for referring to this PHP version when adjusting or removing it.
After you register the PHP version in Plesk, it will be available for selection in service plan settings (
Service Plans >
plan name >
PHP Settings) and in the PHP settings individual websites (
Websites & Domains >
PHP Settings).