![]() |
|
Guide CyberPanel Website Logs: Why PHP Errors Are Missing and How to See Them (Tested) - Printable Version +- AdminsForum (https://adminsforum.com) +-- Forum: Free & open-source control panels (https://adminsforum.com/Forum-free-open-source-control-panels) +--- Forum: CyberPanel (https://adminsforum.com/Forum-cyberpanel) +---- Forum: CyberPanel Guides & Tutorials (https://adminsforum.com/Forum-cyberpanel-guides-tutorials) +----- Forum: CyberPanel Websites & OpenLiteSpeed Guides (https://adminsforum.com/Forum-cyberpanel-websites-openlitespeed-guides) +----- Thread: Guide CyberPanel Website Logs: Why PHP Errors Are Missing and How to See Them (Tested) (/Thread-guide-cyberpanel-website-logs-why-php-errors-are-missing-and-how-to-see-them-tested) |
CyberPanel Website Logs: Why PHP Errors Are Missing and How to See Them (Tested) - JAY - 11-07-2026 Find a website's errors in CyberPanel: access log, error log and PHP errors A site shows "500 Internal Server Error" or a white page, and you open CyberPanel to find out why. Every website has a Logs tab with an access log and an error log. We tested both on CyberPanel 3.0.8 with a WordPress site and a PHP file that crashes on purpose, and found something important: PHP errors do not show up in the panel's Error Logs. This guide shows what each log is good for and how to get PHP errors into a file you can actually read, in about two minutes. Access Logs: who visited and what they asked for Open Websites > List Websites > Manage on your site, click the Logs tab, then Access Logs. You get a table with the request type, visitor IP, time, the page or file requested, and the size of the reply. Use the search box to filter, and Next/Previous to page through older lines. Look at the screenshot: within the same second one IP asked for /wp-%2A.php, /wp-admin/%2A, /xmlrpc.php and a dozen other odd addresses. That is an automated scanner probing a fresh WordPress site, and you will see this on every server on the internet. One IP doing this a lot is a good candidate for a block in Security > Firewall or in Cloudflare. What the panel table does not show is the HTTP status code (200, 404, 500 and so on), which is often what you need. Over SSH you get the full lines: Code: tail -n 50 /home/example.com/logs/example.com.access_log
grep '" 500 ' /home/example.com/logs/example.com.access_log | tailError Logs: web server errors only The Error Logs button shows /home/your-domain/logs/your-domain.error_log. On our server it was empty, even right after we loaded a PHP page that crashed with a fatal error and returned a 500. This log is for OpenLiteSpeed's own problems with the site (bad rewrite rules, missing files, permission problems), not for errors inside your PHP code. So if your site shows a 500 and Error Logs is empty, that is normal. You need a PHP error log. Turn on a PHP error log for one website
Why not put it in the existing logs folder? We tried that first. The logs folder belongs to the web server, and the site's PHP user isn't allowed to write there, so no file ever appeared. The php-logs folder you create in File Manager works. Why php_value and not php_admin_value? If you ever turn open_basedir off for this site, CyberPanel deletes every php_admin_value line from the vHost Conf. Lines that start with php_value and php_flag survive that. Read the PHP errors Open File Manager > php-logs, select php_errors.log and click Edit to view it. Our test file produced exactly what you would hope for: the time, the error, the file and the line number. Over SSH you can watch it live while you reload the broken page: Code: tail -f /home/example.com/php-logs/php_errors.logCommon errors and what they mean
Keep it tidy PHP error logs grow forever if a site keeps throwing warnings. Once a week, have a look at the size in File Manager, fix what is causing the noise, and empty the file (open it with Edit, delete the contents, Save Changes). Don't leave test files that crash on purpose on a live site. Tested on CyberPanel 3.0.8 with OpenLiteSpeed and LSPHP on Ubuntu 24.04. More CyberPanel guides
|