For cPanel + CloudLinux + LiteSpeed + Webuzo
π Introduction
Seeing a white page or HTTP 500 Internal Server Error when visiting your PHP website means that something is brokenβbut PHP is hiding the error output by default. This is common in hosting setups that use cPanel, CloudLinux, LiteSpeed, or Webuzo, where errors are logged rather than displayed.
π Common Causes:
- PHP memory limit exhausted
- Incompatible or missing PHP modules/extensions
- Syntax or runtime errors in scripts
- Corrupt or blank
index.php
or.htaccess
- Wrong PHP version or handler
- File permission or ownership issues
π Step-by-Step Troubleshooting
π 1. Locate PHP Error Logs
β cPanel (No PHP-FPM):
/home/$cpuser/public_html/error_log
β cPanel with PHP-FPM (CloudLinux default):
/home/$cpuser/logs/
β LiteSpeed (if integrated with cPanel):
Also check:
/usr/local/lsws/logs/error.log
β Webuzo:
Logs may be in:
/var/webuzo/users/$cpuser/webapps/$domain/error_log
π 2. Monitor Logs in Real-Time
Run the following to catch the error while reloading the site:
tail -f -n0 /home/$cpuser/public_html/error_log
If using PHP-FPM:
tail -f /home/$cpuser/logs/php-fpm/error.log
If using LiteSpeed global log:
tail -f /usr/local/lsws/logs/error.log
π§ͺ 3. Temporarily Show Errors On-Screen
For debugging only, add this at the top of index.php
or the problematic file:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
β οΈ Never leave these on in production.
βοΈ 4. Check PHP Configuration
cPanel & CloudLinux:
Use selectorctl
to check or change user PHP settings:
selectorctl --get-current --user=$cpuser
List available versions:
selectorctl --list-available
Change version for a user:
selectorctl --set-user-current=8.1 --user=$cpuser
Check and enable missing PHP extensions:
Via CLI:
selectorctl --enable-extensions=mbstring,pdo,mysqli --user=$cpuser
Or via cPanel > Select PHP Version GUI.
π§± 5. File and Permission Checks
- Ensure PHP files are
644
and directories are755
- File ownership should match the cPanel user:
chown -R $cpuser:$cpuser /home/$cpuser/public_html
π 6. Fix .htaccess
and Routing Issues
- Rename
.htaccess
temporarily:mv /home/$cpuser/public_html/.htaccess /home/$cpuser/public_html/.htaccess.bak
- If the error disappears, regenerate
.htaccess
from CMS settings (e.g., WordPress Settings > Permalinks).
π« 7. Fix Memory Limit / Timeout / Execution Issues
Edit .user.ini
or use MultiPHP INI Editor (cPanel) to increase values:
memory_limit = 512M
max_execution_time = 120
To reload PHP-FPM:
/scripts/restartsrv_apache_php_fpm
For LiteSpeed:
/usr/local/lsws/bin/lswsctrl restart
π§° 8. Webuzo-Specific Tips
Webuzo panel has its own error_log location per app:
/var/webuzo/users/$cpuser/webapps/$app/error_log
Also check Webuzo PHP settings via:
Webuzo Admin Panel > Server Settings > PHP Settings
Or use the terminal:
php -v
php -m
β Final Checklist
Check | Description |
---|---|
β Logs | Error appears in error_log |
β PHP Version | Compatible with your app |
β Modules | Required extensions enabled |
β Memory | Sufficient memory limit |
β Permissions | Correct ownership and chmod |
β .htaccess | Valid and uncorrupted |
β Syntax | No PHP code errors |
π Conclusion
HTTP 500 or blank PHP pages are almost always due to server-side misconfigurations or suppressed fatal errors. Using this guide across cPanel, CloudLinux, LiteSpeed, and Webuzo, you should be able to identify the exact issue quickly.