Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.