1

Can any one tell me what triggers then user is uploading a big file? max_input_time or max_execution_time ? since the start of the upload is a php process . ?

I am allowing users to upload 5MB max. So what would be the appropriate settings on those two above?

because when its too little and the file is that big i just get a blank page.

john
  • 21
  • 2
  • Probably in reference to http://stackoverflow.com/questions/4450529/in-my-php-script-larger-file-takes-longer-to-upload-and-its-bound-by-max-executio – Mike B Dec 15 '10 at 18:36

1 Answers1

0

Both trigger but at different times in the process:

  • max_input_time is the time that PHP takes to parse the request and provide its $_POST, $_FILE etc, structures.
  • max_execution_time is the time that your script may run after the request is parsed.

So I'd suggest you do some kind of logging (to a file, not to the browser) in your PHP script to see if the script is actually executed. If it is not executed, then max_input_time has triggered, if it is executed, then your script probably took too long and max_execution_time has triggered.

note though, there may also be other factors leading to a blank page being delivered, so you should really check your php and apache logs for any errors.

Jan Thomä
  • 13,296
  • 6
  • 55
  • 83
  • Well i know for certain that its one of those since when i jack them up i get no error. – john Dec 15 '10 at 18:45
  • Very well, so do you have some logging in your script which logs out the start of the script to a log file? You could also try raising one, then do an upload, then raising the other and doing another upload and see which one of them helps. – Jan Thomä Dec 15 '10 at 18:46
  • so what numbers would you suggest to allow a 5MB max upload? – john Dec 15 '10 at 18:46
  • Hard to say, depends on your server's speed, load, memory, etc. I suggest you start with low values, eg. 2 seconds per megabyte and when it breaks, double them, try again, if it breaks double them, repeat until it works. Should be done in max. 5 iterations. – Jan Thomä Dec 15 '10 at 18:51
  • ok i dont know what to do any more. at one point i had max_execution_time 360 max_input_time 360 and it would work on and off by off i mean the blank page, on a file liek 3.5MB but now i even set it to max_execution_time 1000 max_input_time 1000 and still get a blank page. My error showing is ON but the page is blank no actual error to report. i dont know why its behaving like this? Are there alternatives to this kind of upload? would a flash uploader do anything different? – john Dec 15 '10 at 18:56
  • A flash uploader wouldn't change this. This reads like the problem is elsewhere and not related to the max_xyz_time settings. Do you have any error messages in your PHP/Apache logs? – Jan Thomä Dec 15 '10 at 18:59
  • i dont suppose you have AIM or some kind of messanger? you seem to know a lot about this stuff and my VPS host is unable to figure it out. Maybe we can chat live? You can respond when ever you have free time. I wont bug you. – john Dec 15 '10 at 19:53
  • i have just checked the log and every time my file fails to upload i see these two lines (process:22461): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied (process:11506): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission denied – john Dec 15 '10 at 20:09