Take the 2-minute tour ×

I made a simple script that uploads file that are submitted through a simple html form, It works fine with files that are smaller than 5 mega bytes. When I upload larger files they start to screw things up..

I thought it might be that the execution time is too short, so I used this: set_time_limit(500);

Sadly, it didn't make any difference.

In the form, I have a hidden input that helps me detect if the form was submitted Next, I checked the apache error log and I found that that input was null, So it seems like the long execution time loses the other values..

is there any simple solution for this? or shall I just change the way I detect if the form was submitted?


share|improve this question
Have you also changed the max file upload limit in the ini file –  Sudip Pal Feb 18 '13 at 11:18
Seems to me it's a good idea to check hidden field, just in case you would check if your file exists –  sukinsan Feb 18 '13 at 11:22
@SudipPal I can't change that as I'm hosting my website on a shared web hosting service and they don't want to change too many things for me.. –  Don Feb 18 '13 at 11:25
@sukinsan Yeah, I might actually add another operator to detect if the file exists, if it does i'll execute the script.. I'll make the change and update back here if it worked or not :) –  Don Feb 18 '13 at 11:26
@sukinsan Nope, I managed to detect if the form was submitted.. but the file seems to be lost after the upload is complete, I tried checking the type / name / size of it but it's all empty.. –  Don Feb 18 '13 at 11:40
show 5 more comments

1 Answer

Please check you php settings in php.ini for maximum post size with post_max_size = ?

share|improve this answer
add comment

Your Answer


