When uploading files with a silly file size I’m getting the following PHP error:
Warning: POST Content-Length of 9999378 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Obviously the filesize is larger than the default PHP memory_limit, and as I don’t want users to be uploading files this large that is fine, however the error that it produces is not fine.
Is there a method of suppressing this error and show my own formatted error later on the page?
Use
ini_set(). Replace xx with your needed value.