In this article · 9 sections
- Types of logs
- Where to find them on shared hosting
- Enable logging without showing errors to visitors
- Reading common PHP messages
- Fatal error
- Warning
- Deprecated
- Database errors
- Memory and time limits
- Reading server and access logs
- A simple monthly routine
- Sharing logs with a developer
- Frequently Asked Questions
- Is it dangerous to delete the error log?
- My error_log file is huge. Is that a problem?
- Should I show errors on screen while testing?
- Can logs help with SEO?
- Need help diagnosing website errors?
When a website breaks, visitors see a blank page, a "500 Internal Server Error" or a form that silently does nothing. The cause is almost always recorded somewhere: in the error logs. Learning to find and read them — even at a basic level — helps you fix problems faster and explain them clearly to your developer.
Types of logs
| Log | What it records |
|---|---|
| PHP error log | Fatal errors, warnings and notices from PHP code |
| Web server error log (Apache/LiteSpeed) | Server-level problems: .htaccess errors, permission issues, missing files |
| Access log | Every request: IP, page, status code, user agent |
| Database log | Slow or failed queries (usually not available on shared hosting) |
| Application log | Custom logs your website writes, such as failed emails or payments |
Where to find them on shared hosting
- Hostinger hPanel: look in the website's Advanced section for error or access logs; PHP error logging can be enabled in PHP Configuration.
- cPanel: the "Errors" and "Raw Access" or "Metrics" sections.
- File manager: many hosts write a file named
error_login the folder where the error occurred.
Panel layouts change, so if you can't find logs, ask your host's support where they are for your plan.
Enable logging without showing errors to visitors
On a live website, errors should be logged, not displayed. Displaying errors can reveal file paths and database details to attackers. A typical setting (in PHP configuration or .user.ini):
display_errors = Off
log_errors = On
error_log = /home/username/logs/php_errors.log
Keep the log file outside the public folder, or block it from being downloaded.
Reading common PHP messages
Fatal error
PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect()
in /home/user/public_html/connection.php:5
The script stopped. Here, old mysql_* code is running on a newer PHP version. See upgrading PHP safely.
Warning
PHP Warning: Undefined array key "city" in /home/user/public_html/route.php on line 12
The script continued, but something expected was missing. Often harmless, sometimes the cause of blank sections.
Deprecated
Code uses a feature that will be removed in a future version. Fix it before your next upgrade.
Database errors
mysqli_sql_exception: Unknown column 'source' in 'field list'
The code expects a database column that doesn't exist — a common cause of forms that appear to submit but never save leads.
Memory and time limits
"Allowed memory size exhausted" or "Maximum execution time exceeded" usually point to large uploads, heavy loops or slow external APIs.
Reading server and access logs
- 500 errors often come from a typo in
.htaccessor wrong file permissions. - 404 errors in access logs show missing files — broken images, old links, or bots probing for
wp-login.php. - Many requests from one IP may indicate a bot or attack. See stopping form spam.
- User agents reveal crawlers such as Googlebot, Bingbot, GPTBot. See AI crawlers.
A simple monthly routine
- Open the PHP error log and look at the newest entries.
- Group repeated messages — one bug often creates hundreds of lines.
- Note the file and line number and send them to your developer.
- After fixes, clear or rotate the log so new problems stand out.
- Submit a test form and check nothing new appears.
Sharing logs with a developer
When you report a problem, send the exact error line, the date and time, the page you were on and what you clicked. Remove any passwords or personal customer data from the log before sharing it. A precise report can turn a day of guesswork into a ten-minute fix.
Frequently Asked Questions
Is it dangerous to delete the error log?
No, it's just a record. Download it first if you need it for a developer.
My error_log file is huge. Is that a problem?
It means something is repeatedly failing. Fix the cause; large logs can also use up disk space.
Should I show errors on screen while testing?
Only on a staging or local copy, never on the live site.
Can logs help with SEO?
Access logs show how often Googlebot crawls your pages and which URLs return errors — useful for technical SEO.
Need help diagnosing website errors?
Joboo Web troubleshoots and fixes PHP websites. See web development, our maintenance checklist, or contact us.