Jump to content

[SOLVED] Error reporting control


EchoFool

Recommended Posts

Hey,

 

I was wondering if theres a way to prevent php syntax errors from displaying the page location fully?

 

Like say it had:

Parse error: syntax error, unexpected T_ELSE in /server/user/root/includes/connection.php on line 717

 

I want it to just say:

Parse error: syntax error, unexpected T_ELSE in connection.php on line 717

 

That way users have less oppotunity if an error occurs to see the directory structure of my files? Whilst at the same time the error is helpful for me to find the problem quickly cos i know where my php file names are, no two have the same name anyway.

 

Hope you can help.

Link to comment
https://forums.phpfreaks.com/topic/130776-solved-error-reporting-control/
Share on other sites

I recommend always having error_reporting set to E_ALL so that things like visitors searching for terms that contain unexpected values that cause errors or more seriously hackers feeding your code unexpected data to break into your script, will show up in your error log so that you have a record of any problems that are occurring.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.