Error Log Gone

Status
Not open for further replies.

semsemx1

Member
Messages
55
Reaction score
0
Points
6
First, I noticed that errors are no longer being printed on the page where they occur, instead if a (true) error exists (other than notices, warnings) the page goes blank and I need to view the error in the error log. Now, there is no error log and white pages. There is no way for me to see what the issue is.
 

semsemx1

Member
Messages
55
Reaction score
0
Points
6
Anything? I know errors are being thrown, but the "error_log" file isn't being written. It was gone for a week or two maybe a month ago. Prior to that downtime, it only reported true errors, after the downtime it was reporting everything (errors, warnings, notices) and throwing white screens when there was a true error (without loading part of the page and showing the error on screen). So...there are errors being thrown but no way to view what they are. This is becoming a pain.
 

ttbx10ho

Member
Messages
62
Reaction score
5
Points
8
Do you mean the error log viewed in cpanel>filemanager>public_html/errorlog?
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
You could try adding the line

ini_set("log_errors", 1);

at the top of your script. It seems to turn on error logging on xo2 . After you get everything working, you might think about turning logging off.

You can add

ini_set("display_errors", 1);

to have the errors displayed BUT a) it is ugly for the user AND b) sometimes displays information you might not want seen.
 
Last edited:

ttbx10ho

Member
Messages
62
Reaction score
5
Points
8
sounds like the script is die(). Can you access say a html file or php file that has no errors?
 

semsemx1

Member
Messages
55
Reaction score
0
Points
6
It isn't a die(). I could access all other files, except the one that I knew was throwing an error. I found a solution, cPanel->Select PHP version->Switch to PHP Settings->Display Errors and set it to "Yes" and hit save. Of course, all it does is then display ALL the errors on every page, so I need to wait until my users are not online before I do it to solve the issues in coding that might be present.
It was much nicer when the cPanel->File Manager->public_html/error_log file was being written to...keeps the errors away from the users, and allows me to fix them when I have time.
 

mattura

Member
Messages
570
Reaction score
2
Points
18
Thanks, I also had this problem.
The CPanel solution worked fine for me:
Cpanel - PHP Version - Switch.. - click on the text "Off" to the right of "display_errors", select "On", "Apply", "Save"
 
Status
Not open for further replies.
Top