suriya Posted October 2, 2012 Share Posted October 2, 2012 Username:suriyawebsite:suriya.me So my problem is that my error_log file gets VERY big , and I have to delete it at least once a day.Any way you can turn off that feature for me,or limit the size of the file at /public_html and at /public_html/wp-admin/ I also get 500 errors frequently . Can I know the reason ? Quote Link to comment Share on other sites More sharing options...
Krydos Posted October 2, 2012 Share Posted October 2, 2012 Why don't you just fix all the php errors that are listed in the error_log? 1 Quote Link to comment Share on other sites More sharing options...
suriya Posted October 2, 2012 Author Share Posted October 2, 2012 I am working on that .Thing is I have lots of people visiting from their mobile devices which look up for files that don't exist (Like:http://suriya.me/app...precomposed.png),and that is what I suspect is giving me errors.and sometimes Mysql does not work cause of too much traffic , can you in increase the number of user connects pls ? Quote Link to comment Share on other sites More sharing options...
Byron Posted October 2, 2012 Share Posted October 2, 2012 If you can't figure out how to fix the errors, make a file and name it something like "delete.php", then add this code to it: <?php unlink("error_log"); ?> Then use an include on the page where the errors are generated from like this: <?php include("delete.php"); ?> Now the error_log file will be deleted anytime somebody views your page. EDIT: Try this first before you try my other suggestion. Add this to the top of your php page: <?php error_reporting(0); ?> 1 Quote Link to comment Share on other sites More sharing options...
HosterSlice Posted October 2, 2012 Share Posted October 2, 2012 The best way to do this is with the PHP configuration. <?php ini_set('log_errors','off'); ini_set('log_errors_max_len','0'); phpinfo(); Those two directive tell php not to log the errors, and to only log 0kb of errors. Quote Link to comment 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.