Process control and release semantics
Entry point and commands
Section titled “Entry point and commands”Use the same application entry file, working directory, PHP binary and service user for control commands. PID/status paths must refer to that application instance. These commands are read from Server 7e7cbda, not a promise for Server 4 or every platform.
php server.php startphp server.php start -dphp server.php status --jsonphp server.php connections --jsonphp server.php capabilities --jsonphp server.php reload -gphp server.php stop -gphp server.php restart -gphp server.php upgradephp server.php helpStart in the foreground while developing. With a supervisor/container, normally keep foreground execution and let the supervisor own restarts; avoid nested daemon managers. Unix daemon mode uses -d and configured stdout/log files. Configure writable runtime paths per instance and never share PID files between applications.
Reload, restart and upgrade differ
Section titled “Reload, restart and upgrade differ”- reload replaces workers from the already-running master image. PHP definitions loaded by that master may remain old. Do not assume reload deploys arbitrary changed PHP classes.
- restart stops and starts the application; it can create a listener gap and requires startup health verification.
- upgrade attempts master re-exec/listener handoff when advertised runtime capabilities permit it. Unsupported runtimes or changed listener topology have separate failure/fallback behavior; inspect capabilities and test the exact release.
- -g requests graceful stop/restart/reload. It is bounded by worker/protocol shutdown behavior and timeouts; it is not a guarantee of no disconnected WebSocket clients or no lost application data.
Acceptance and recovery
Section titled “Acceptance and recovery”Verify the new revision, listening address, HTTP health, a real request, logs and long-lived connection behavior. Test slow requests, clients that never disconnect and a failing new worker. Keep a rollback artifact/config; rollback does not automatically reverse data migrations. In-memory worker state is not durable and is not shared between processes.
Windows and no-pcntl single-process fallback do not have the full Unix control/supervision model. Use CLI capabilities rather than assuming a command’s presence means the runtime can execute it. Source. Reviewed 2026-10-17; Ivan Zorin / Localzet Group.