Welcome to WebmasterWorld Guest from 18.104.22.168
I am trying to set an 8MB limit on files that users can upload. In php.ini I have set upload_max_filesize to 8MB and post_max_size to 12MB. If a user uploads a 10MB file, then $_FILES['filename']['error'] equals 1, as expected. However if the user uploads a 13MB file, then PHP writes a warning message to syslog and simply gives up; it doesn't write *anything* to stdout! (I'm using PHP4.3 on WinXP with Apache2). I try to register my own error handler in the upload script but nothing happens; I'm guessing PHP gives up before the script ever gets loaded. And I have not been able to find documentation explaining how to gracefully trap the case where post_max_size is exceeded. (IMHO, setting post_max_size to 120MB is definately *not* graceful, because a 75MB file will still be uploaded, instead of interrupting the transfer after the limit has been exceeded.)
Can anyone point me to documentation, or offer any suggestions how I can get around this problem?
Thanks in advance,