your.syndrome Posted February 19, 2009 Share Posted February 19, 2009 Hi, I'm using WordPress on one of my sites and it's generating a 2GB file size of the error log and using up the disk space. Is there any short term fix to stop the error log building up? I think it may be down to the amount of plugins and multiple languages being added ( via plugins ) Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/ Share on other sites More sharing options...
allworknoplay Posted February 19, 2009 Share Posted February 19, 2009 Hi, I'm using WordPress on one of my sites and it's generating a 2GB file size of the error log and using up the disk space. Is there any short term fix to stop the error log building up? I think it may be down to the amount of plugins and multiple languages being added ( via plugins ) Well you really need to fix what's causing the errors. But if you just want to clear them out just do this in linux... " > error.log " That will make the file zero. You can write a PHP program to do this, and run the cron once every 24 hours or however you wish... Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/#findComment-766304 Share on other sites More sharing options...
premiso Posted February 19, 2009 Share Posted February 19, 2009 ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of ; error displaying on production web sites. log_errors = On Find that in your php.ini and turn it to "off". You may even be able to do this with .htaccess as long as the server allows it. Or follow what was posted above to to clear it out. Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/#findComment-766306 Share on other sites More sharing options...
allworknoplay Posted February 19, 2009 Share Posted February 19, 2009 ; Log errors into a log file (server-specific log, stderr, or error_log (below)) ; As stated above, you're strongly advised to use error logging in place of ; error displaying on production web sites. log_errors = On Find that in your php.ini and turn it to "off". You may even be able to do this with .htaccess as long as the server allows it. Or follow what was posted above to to clear it out. Forgot about that....that's better than my suggestion.... Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/#findComment-766309 Share on other sites More sharing options...
your.syndrome Posted February 19, 2009 Author Share Posted February 19, 2009 So if I put this in the htaccess? php_flag log_errors off Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/#findComment-766315 Share on other sites More sharing options...
premiso Posted February 19, 2009 Share Posted February 19, 2009 So if I put this in the htaccess? php_flag log_errors off Try it. As long as your host allows for that it should work. Quote Link to comment https://forums.phpfreaks.com/topic/145968-error-log-crashing-server-due-to-file-size/#findComment-766321 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.