Where can we find the PHP error log in cPanel?

The PHP Error Log is a valuable file that records all the issues encountered by the PHP engine while running a script. This can be located in the php.ini configuration file but can be changed to any other directory on the server. The log provides detailed information about errors - including their file and line number locations and descriptions of what happened. Additionally, it's also helpful for identifying performance bottlenecks by tracking how many errors were logged over a set period of time.

Generally, It is located in the public_html folder. You can check the location of the PHP error log from the cPanel. Below are the steps to check the location of the PHP error log.

Step 1: Log into your cPanel.

Step 2: Go to the Software section and click on the MultiPHP INI Editor option.

Step 3: In the MultiPHP INI Editor window, select the Editor Mode tab and select the location in the dropdown menu.

 

Step 4: Once you select the location, the code will be displayed below the path field. You will find the path of the PHP error log from the error_log line.

How to view PHP Error Logs in cPanel?

In cPanel, you can find the error log file in the file manager by following these steps:

Step 1: Log in to your cPanel account.

Step 2: Click on the File Manager icon under the Files section.

 

Step 3: Go to the Home directory icon in the file manager window and click on the Public_html folder.

Step 4: Search for a file named error_log.

Step 5: Right-click on the error_log file and open it in view mode. Once you open the error log file in view mode, it will look like the one below.

You can locate the error log file in the file manager by searching for 'error_log'. This subsequently will indicate the path to the log. This PHP error log records all errors and warnings established by the PHP engine while running a script. Each error is recorded separately, with its form including date and time, followed by the relevant message. Reviewing this log regularly will help identify and resolve difficulties, improve visitor satisfaction, and prevent recurrent malfunctions on your website.

That's all.

 


Was this answer helpful?

« Back

chat

/* */