Jump to content

[Answered] Big Error File


suriya

Recommended Posts

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 ?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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