How to check website error? (Where is error.log?)

Status
Not open for further replies.

tlglobal

New Member
Messages
8
Reaction score
0
Points
1
Hi guys,
Could anyone tell me where or how we can check error log related to our site?
On other server (other service provider) there would be a file named error.log in each of the domain's root folder which log all errors and we can check and fix it easily but I couldn't find one in x10 free hosting.
Really appreciated if you can help!
Thanks,
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
In cPanel: Select PHP Version > Switch to PHP Settings
Change the value of log_errors to 'On'. Optionally but recommended, change the value of display_errors to 'Off'.
Remember to block access to all 'error.log' files via .htaccess so that you can only access it via FTP or cPanel's file manager. error.log files are created in the same directory as the script being executed.
 

tlglobal

New Member
Messages
8
Reaction score
0
Points
1
Thanks caftpx10.
I already updated the settings for error log as you suggested.
Could you please share with me where should I look for the log file for details? I've been searching for it but couldn't find one.
Thank you very much,
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
If you were to visit 'yourwebsite.x10.mx/something/script.php' and that script gets a fatal error, the log would be found in the same directory. In this example, 'public_html/something/' ('public_html' being where your website files would go into).
If there's still no luck, there's a chance that the permissions are preventing the log from being created.
 

tlglobal

New Member
Messages
8
Reaction score
0
Points
1
Thanks caftpx10,
I finally found the cause of the 500 internal server error. It is the .htaccess file that does not work.
Thanks again and have a nice day!
 
Status
Not open for further replies.
Top