Jump to content

Recommended Posts

My Web Hosting Administrator currently turned off the display_error now i can't see the error message in the script, is this correct? or is this very wrong.

 

Ok below is the reason why he turn it off.

 

There is security issue if we enable "display_errors" feature:

; - display_errors = Off           [security]
;     With this directive set to off, errors that occur during the 
execution

of
;     scripts will no longer be displayed as a part of the script 
output, 
and thus,
;     will no longer be exposed to remote users.  With some errors, the 
error message
;     content may expose information about your script, web server, or 
database
;     server that may be exploitable for hacking.  Production sites 
should 
have this
;     directive set to off.

 

 

Is there another way to display the error message without turning on "display_error" option?

 

Thank you very much in advance....

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/46557-display_error-turned-off-is-this-correct/
Share on other sites

maybe try using error_reporting in your code, maybe will override it.

 

error_reporting(E_ALL);

 

 

 

error_reporting does not override display_errors

 

don't know why people always recommend this. // had my moan :D

 

On to the reply

 

You should only turn display_errors on if you are in development stages of your script. If you are developing then you shouldn't really be in a live environment, IMO. You should do all development offline. You can install a package called WAMP to develop offline if you wish. This helps streamline development by by-passing uploading/downloading of files when you make changes and having to connect to net to test the changes. Installing wamp bypasses this as it is on your computer not the net.

 

If have finished developing/testing and you are moving to a live environment then display_errors should be turned off and you should turn on a setting called log_errors instead. That way any errors that do occur are not shown (for security reasons) and you can see you errors by opening the log file you have setup. Most hosting companies do this.

:D hi wildteen it's me askjames01 the eyeball avatar, remember me?

 

bro can you explain to me further.

 

 

You should only turn display_errors on if you are in development stages of your script. If you are developing then you shouldn't really be in a live environment, IMO. You should do all development offline. You can install a package called WAMP to develop offline if you wish. This helps streamline development by by-passing uploading/downloading of files when you make changes and having to connect to net to test the changes. Installing wamp bypasses this as it is on your computer not the net.

 

What is WAMP? can you show me the link for WAMP? Any additional details please?

I know there are many different meaning of WAMP, that's why i'm asking you.

 

If have finished developing/testing and you are moving to a live environment then display_errors should be turned off and you should turn on a setting called log_errors instead. That way any errors that do occur are not shown (for security reasons) and you can see you errors by opening the log file you have setup. Most hosting companies do this.

 

So what is this log_errors do? i mean can i get the copy of my error log file automatically? or do i need to ask them each time i need it? any additional info again? I really don't want to bother them every time i wanted it, just for log_errors, is there an automatic way?

 

So you mean it is not necessary to turn on the "display_error" option, you mean it is 100% possible to develop the codes without turning it on?

 

I would like to know also if www.phpfreaks.com "display_error" is turned off or on?

 

 

long time no see wildteen.  ;D

 

 

Thank you very much in advance.

 

What I mean by WAMP was WAMP Server - I sure you have heard of it before.

 

If you have a website then more than likely your webshot has this already setup. Look in the control panel your webshots provides. Look for a section called or similar to logs, site logs etc.

 

So you mean it is not necessary to turn on the "display_error" option, you mean it is 100% possible to develop the codes without turning it on?

You can have it off it want by you'll only get a bank page if errors do occur especially if your script gets fatal errors/warnings.

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.