Creating a PHP Error Log
Written by Tim SissonPHP, has a solution to log all of your errors to a specific log file. It's simple, as you just have to add a line of code to your php.ini file. For this example we'll create a log file in the root directory: /home/username/phperror.log (dont forget to replace the username in the file path with your actual cPanel username):
error_log = /home/username/phperror.log
For detail detailed information on this, see the article on Display and log errors for PHP.
If you would like more information on working with your php.ini file, please review the following article:
Updating your local PHP settings
You will also need to write a basic PHP script to generate and update the log file. For more information on sending PHP errors to a log file please review the following link:
http://www.php.net/manual/en/function.error-log.php
If you are looking for the general error log for your cPanel account. you can find it within cPanel itself. On the cPanel home screen, click on the "Error Log" icon.
Latest Questions
Need more Help?
Search
Ask the Community!
Current Customers
| Chat: | Click to Chat Now | E-mail: | support@InMotionHosting.com |
|---|---|---|---|
| Call: | 888-321-HOST (4678) | Ticket: | Submit a Support Ticket |


