suriya Posted October 2, 2012 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 ?
Krydos Posted October 2, 2012 Posted October 2, 2012 Why don't you just fix all the php errors that are listed in the error_log? 1
suriya Posted October 2, 2012 Author 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 ?
Byron Posted October 2, 2012 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
HosterSlice Posted October 2, 2012 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now