1

I'm currently using Codeigniter as my default framework to create some my projects. But, when I uploaded the projects on my servers and after 3 three days the error log has achieved over 1 mb in my server. How can I ignore this error log? Does the error log caused by my server or codeigniter itself ?

Your help will be very appreciated.

2
  • 1
    Can you paste a part of the error log. There might be many reasons for the logs: -If you are using PHP 5.3 there will be a ton of 'depracated' errors -Favicon missing -An application error, which you would need to fix. All the answers are in the log file, go through it. Commented Aug 24, 2011 at 10:30
  • @Jamie : Both (Apache and CI) How can I disable the error log. Here is the the error log looks like: [15-Aug-2011 21:40:21] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0 [19-Aug-2011 06:16:13] PHP Notice: Trying to get property of non-object in /home/cimeric1/public_html/grandsakurahotel.com/new/framework/application/views/uiwebview/bookpackage_view.php on line 62 Commented Aug 25, 2011 at 9:51

1 Answer 1

6

Assuming this is the Codeigniter error logging you are referring to, check your config.php for the log_threshold setting and set it to 0 to disable error logging:

/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| If you have enabled error logging, you can set an error threshold to
| determine what gets logged. Threshold options are:
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
|   0 = Disables logging, Error logging TURNED OFF
|   1 = Error Messages (including PHP errors)
|   2 = Debug Messages
|   3 = Informational Messages
|   4 = All Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;

I usually set it to 1, at least while in development. If you do enable error logging, you should read the error logs and correct the errors if possible, otherwise it is pointless.

Sign up to request clarification or add additional context in comments.

1 Comment

Ok, thank you. That was really help. I'll try. But does it ignore the error from my server (Apache). The error something like this: [15-Aug-2011 21:40:21] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.