The php_handler
utility is used to PHP versions, SAPI and php.ini
availiable for hosting users (PHP handlers). For more information, see
Multiple PHP
Versions
and PHP
Settings
in the Administrator’s Guide.
By using the php_handler
utility, you can perform the following
tasks:
- managing PHP handlers in Plesk
- replacing one PHP handler with another for all used service plans and
sites - obtaining information about PHP handlers in JSON or plain text format
Usage
php_handler <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command registers a new PHP handler as FastCGI binary in
Plesk.
plesk bin php_handler --add -displayname "MyHandler 5.4" -path /usr/bin/php-cgi -clipath /usr/bin/php -phpini /opt/plesk/php/5.4/etc/php.ini -type fastcgi
The following command registers a new PHP handler as an FPM application
in Plesk.
plesk bin php_handler --add -displayname "MyHandler 5.5" -path /usr/bin/php -clipath /usr/bin/php -phpini /opt/plesk/php/5.5/etc/php.ini -type fpm -service php5-fpm -poold /etc/php5-fpm/pool.d
…