Home » Categories » Servers » Latest Gen Dedicated Servers

Setup PHP error logging

When troubleshooting PHP errors, you will want to review your PHP logs. If you don't have PHP logs to review, use the following process to set up logging:

  1. You should always backup your site before making any changes to your site.
  2. Locate your PHP initialization file
  3. Edit the file.
  4. Place the following line in your initialization file:
    error_log = /path/to/your/webroot/php_error.log
    1. error_log is the PHP function that will tell the web server to output your logs to a new file.
    2. /path/to/your/webroot/php_error.log is the path to your new log.
      1. Make sure to replace /path/to/your/webroot with the actual path your hosting account uses.
  5. Create the a file named php_error.log in the in the webroot of your hosting.
  6. Restart your PHP processes.
0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
Related Articles
Why can’t I use my BitTorrent Tracker?
Added on Tue, Mar 3, 2015
Switching to the root user on my Linux server
Added on Tue, Sep 1, 2020
Unblock ports required for my Dedicated Server
Added on Wed, Sep 2, 2020
Patching Your Server
Added on Wed, Sep 2, 2020