This method restarts PHP on all servers or on specified servers in the cluster. A 202 response in this case does not always indicate a successful restart of all servers. Use the clusterGetServerStatus command to check the server(s) status again after a few seconds.
Required Permissions: full
HTTP method: POST
Supported by Editions: All
Request Parameters:
Parameter |
Type |
Required |
Description |
servers |
Array |
No |
A list of server IDs to restart. If not specified, all servers in the cluster will be restarted. In a single Zend Server context this parameter is ignored. |
parallelRestart |
Boolean |
No |
Sends the restart command to all servers at the same time. The default value is "FALSE". |
Expected Response Code: 202 Accepted
Response Type: serversList with the status of all servers to which the restart command was requested (i.e. the servers provided in the servers parameter or all servers if no servers are specified).
Possible Action Specific Error Codes:
HTTP Code |
Error Code |
Description |
404 |
noSuchServer |
One or more of the provided server IDs does not exist. In this case, no servers are restarted. |
500 |
restartFailed |
Restarting at least some of the servers failed. This response is only possible when working with a cluster. |
Example: Request (headers removed for clarity): POST /ZendServerManager/Api/restartPhp Response: HTTP/1.0 202 Accepted |
|
|
|
|
Related Links: Server and Cluster Management Methods |
|
|
|