Hjælp

Linux-hosting (cPanel) Hjælp

Set up custom-defined PHP error logs in cPanel for my Linux Hosting

cPanel offers built-in error logging, but it doesn't catch errors generated from PHP or keep error logs for extended periods of time. To remedy this, you can have PHP store errors it encounters in a custom-defined error log file.

Required: To follow these steps you need your FTP username.
  1. Create a file called php_error.log, and move the file to your server with FTP or the cPanel File Manager.
  2. Create or edit a PHP initialization file containing the following line of code:
    error_log = /home/[your FTP username]/public_html/php_error.log

    Note: Make sure this file has the right name.

Now, PHP will pass any coding-related errors to the php_error.log file. This file can take a few hours before it starts receiving errors your website generates, and only displays content if your website does generate errors.

More info


Hjalp denne artikel?
Tak for din feedback. Benyt telefonnummeret til support eller chat-funktionen ovenfor, hvis du vil tale med en kundeservicerepræsentant.
Det glæder os, at vi kunne hjælpe! Er der andet, vi kan gøre for dig?
Beklager. Fortæl os, hvad du fandt forvirrende, eller hvorfor løsningen ikke løste dit problem.