php_handler.exe: Custom PHP Handlers
The php_handler
utility is used to register custom PHP handlers, which allow you to use multiple PHP versions and multiple php.ini
files in Plesk. For more information, see Multiple PHP Versions in the Administrator's Guide.
By using the php_handler
utility, you can perform the following tasks:
- changing a certain PHP handler in service plans and subscriptions
- listing registered PHP handlers in JSON format
Location
%plesk_cli%
Usage
php_handler.exe <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command enables the custom PHP handler with ID 3.
php_handler.exe <code>--enable -id 3</code>
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Replaces a certain PHP handler with another one for all service plans and websites in Plesk. |
To replace the PHP handler (id=123) with another PHP handler (id=789): php_handler.exe --replace -old-id 123 -new-id 789
|
|
|
Enables the specified PHP handler. |
To enable the plesk-php52-cgi PHP handler: php_handler.exe --enable -id plesk-php52-cgi |
|
|
Disables the specified PHP handler. |
To disable the plesk-php52-cgi PHP handler: php_handler.exe --disable -id plesk-php52-cgi |
|
|
Displays the usage of the specified PHP handler. |
To get the usage of the plesk-php52-cgi PHP handler: php_handler.exe --get-usage -id plesk-php52-cgi |
|
|
Displays the list of all PHP handlers registered in Plesk. |
To view all registered PHP handlers: php_handler.exe --list |
|
|
Refreshes information about PHP handlers in Plesk. Use this command after you changed PHP handlers properties not through Plesk. |
To refresh information about PHP handlers in Plesk: php_handler.exe --reread |
|
|
Displays help on the use of the utility. |
To view help on the use of the utility: php_handler.exe --help or php_handler.exe -h |
Options
Option | Parameter | Description | Example |
---|---|---|---|
|
|
Sets the PHP handler identifier. |
To get the usage information for the PHP handler with the ID 5: php_handler.exe --get-usage -id 5 |
|
|
Specifies the PHP handler you want to replace. |
To replace the PHP handler (id=123) with another PHP handler (id=789): php_handler.exe --replace -old-id 123 -new-id 789 |
|
|
Specifies the PHP handler with which you want to replace the existing one. |
|
|
|
Displays the output in the JSON format. |
To display the list of PHP handlers in the JSON format: php_handler.exe --list -json |