Jump to content

Recommended Posts

Posted

Username:suriya

website: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 ?

Posted

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 ? :)

Posted

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);
?>

  • Like 1
Posted

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.

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.   Paste as plain text instead

  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...