Apache has great logging features, but if you’re using shared hosting, then sometimes removing error_log files might not be very simple.
Poking around the Internet did lead me to Lester’s site, where he has generously created and offered an error_log file cleaning script for free. Grab that script here. Just upload that script to your web server, run it, and any error_log file that it finds (it searches downwards recursively), it will delete. So if you’re looking for a way to automatically delete error_log files, this is probably your best bet.
I’ve also mirrored it here. It’s a .txt file, so just rename it to .php for it to work.
- How To Solve Problem of PHP Fatal error: Allowed memory size of 8388608 bytes exhausted…
- Edit .htaccess to increase PHP’s max file upload
- How To Resolve 500 Internal Server Error
- How To Remap Keyboard Keys In Windows (Such as the with Apple Keyboard)
- Recursively Delete Files and Retain Folders in Windows