PHP File upload fails with blank screen when size exceeds 742 KB.
- by user284839
Hi friends,
This is one of the most bizarre errors I've come across. So I've written a little file upload web app for my friend and it works fine for any file less than or equal to 742kB in size. Needless to say, I arrived at this precise number based on relentless testing.
Weird part is that if the file size is just a few KB more, for example 743 or 750, I get an error saying "MySQL has gone away". But if it is 1MB or more, then I just get a blank screen. And it happens in less than 2 seconds after I hit the upload button. So it doesn't look like a time-out to me.
I checked out the PHP.ini file for post size and upload size, they are all set to 5 MB or more. And the timeout is set to 60 seconds.
The uploaded file sits in MySQL database in a field of datatype mediumblob. I tried changing that to longblob. But that didn't help either.
Any help?
Thanks for reading,
Girish