Jump to content

Recommended Posts

Let's say I have a forum with 300 active people posting 24/7

 

I have error reporting turned off.

 

But if I turn it on, it shows 100-200 Undefined variable's error's on each forum page, even if it's off does it effect performance or does it matter if the php is writing to a error_log? If so how can I disable php writing to a error_log as I have no sense or no need for it.

 

Thanks, and would the speed be noticable if I went ahead and fixed all the errors, if it would help? or no

 

I code fine, it's just i dont use the isset..

Link to comment
https://forums.phpfreaks.com/topic/256520-undefined-variable-will-slow-php-or-no/
Share on other sites

The reporting/display/logging of the error message is just the last step in the error handling code that php executes every time it encounters an error every time your code runs.

 

The reason you would want to find and fix the cause of any php produced error message is so that only real errors will be reported and displayed/logged, so that you will know when a legitimate visitor did something that your logic did not take into account or a hacker is trying (did) break into your script and how he did it, so that you can find and fix the problem.

 

If you are getting 100's of errors, producing a gigabyte size error log file, you are definitely not coding fine.

The reporting/display/logging of the error message is just the last step in the error handling code that php executes every time it encounters an error every time your code runs.

 

The reason you would want to find and fix the cause of any php produced error message is so that only real errors will be reported and displayed/logged, so that you will know when a legitimate visitor did something that your logic did not take into account or a hacker is trying (did) break into your script and how he did it, so that you can find and fix the problem.

 

If you are getting 100's of errors, producing a gigabyte size error log file, you are definitely not coding fine.

 

Well then it's time to fix them,

 

I guess I thought I was right? But atleast I know now right? I mean we all start somewhere?

 

I am going to have to spend prob days going through each file and fixing each undefined $_GET and just pretty much add a isset to all the undefined's?

 

 

Check out this article:

 

http://stackoverflow.com/questions/1868874/does-php-run-faster-without-warnings

 

You can save alot of ms's by just fixing your files, lol (found out this article after I posted here cause I was so curious)

 

this sucks tho, i got literlaly hundrends ...... ON each file, i got like 50 files lol this gonna take forever.....

 

 

 

Also, one of my errors are this line:

 

$DB->obj['debug']            = ($INFO['sql_debug'] == 1) ? $_GET['debug'] : 0;

 

It's a terny operator? I see nothing wrong with it?

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.