Command Setup
Learning Focus
By the end of this lesson you will know how to set the correct command path for lsphp and troubleshoot binary-not-found errors.
What the Command Setting Does
The Command field in the external application definition tells OpenLiteSpeed which binary to execute when it needs a PHP worker. If this path is wrong, PHP pages return 503 errors.
Finding the Correct Binary
# List available lsphp versions
ls -la /usr/local/lsws/lsphp*/bin/lsphp
# Check a specific version
/usr/local/lsws/lsphp84/bin/lsphp -v
# Expected output:
# PHP 8.4.x (litespeed) ...
Setting the Command in WebAdmin
- Server Configuration → External App → select or add lsphp app
- Set Command:
/usr/local/lsws/lsphp84/bin/lsphp - Save and Graceful Restart
Common Problems
| Problem | Cause | Fix |
|---|---|---|
| 503 on all PHP pages | Wrong binary path | Verify with ls -la |
| Binary not found | lsphp not installed | sudo apt install lsphp84 |
| Wrong PHP version | Path points to old version | Update to correct lsphpXX path |
| Permission denied | Binary not executable | chmod +x /usr/local/lsws/lsphp84/bin/lsphp |
Key Takeaways
- The command path must point to a valid, executable lsphp binary.
- Verify the binary exists and works before configuring.
- 503 errors on PHP pages almost always trace back to the external app command or socket.
What's Next
- Continue to Socket Configuration for communication path setup.