Sometimes, it happens that when you try to access your domain in a web browser you will get a 500 Internal Server Error and after checking all the permissions and ownerships for all files and folders under that domain you will find that everything is correct but still getting that error in the browser.
But when you try to manually execute the php file from the server using the php command as
root@server[public_html]# php index.phpFile size limit exceeded (core dumped)
you will get the above error and now you start thinking what on earth is that .
Reason for that ?
The reason for that error is that one of the file probably a log file under that domain exceeds to 2 GB and by default Apache has setting enabled, to display 500 Internal Server Error if in case any file under a domain exceeds 2 GB.
How to fix ?
Just either remove that file or echo that file and you are done.
Tried the above fix but still not working ?
In that case, I suggest you to check all the apache logs files specially error_log, suphp_log, suexec_log and modsec_audit.log and if you found any log file over 2 GB then just remove/echo that file and restart apache service and you are done.
