File Uploader

Hello All

I am making a file uploader, I have noticed my script will not upload the file when over a certain size, I have tried to use ini_set to set some settings to increase the maximum file size upload allowed, but I have read that because the ini_set will be within the same iteration of the upload script, and because it executes after the file upload it will not take effect in time.

Is there a solution around this? I intend my application to be distributed over the internet therefore it would be convenient to be as simple as possible.

Cheers
[578 byte] By [I_Love_My_Vans] at [2007-12-5 11:58:27]
# 1 Re: File Uploader
Do it in php.ini it's the only way to allow a larger file size.
RudiVisser at 2007-12-4 16:47:14 >
# 2 Re: File Uploader
But, what if the end user has no access to their PHP.ini file, is there a way of setting the ini temporarly for that session?
I_Love_My_Vans at 2007-12-4 16:48:14 >
# 3 Re: File Uploader
But, what if the end user has no access to their PHP.ini file, is there a way of setting the ini temporarly for that session?

That would be the ini_set function

http://uk.php.net/ini_set

This might work:

ini_set("upload_max_filesize", "10M");
Matt_T_hat at 2007-12-4 16:49:13 >
# 4 Re: File Uploader
Nope he's already said that doesn't work, it needs to be set in php.ini so that it's set as the file's uploading.
RudiVisser at 2007-12-4 16:50:16 >
# 5 Re: File Uploader
To tell the truth, me and DClamp spent an hour last night on remote assistance, changing that setting and not once did it work. :(
I_Love_My_Vans at 2007-12-4 16:51:15 >
# 6 Re: File Uploader
There are a few other settings that could be causing your uploads to break.
See:
How to optimize your PHP installation to handle large file uploads ( http://radinks.com/upload/config.php)
penagate at 2007-12-4 16:52:14 >
# 7 Re: File Uploader
we tried that last night pena. No luck. Might want to try it again though ILMV :wave:
dclamp at 2007-12-4 16:53:19 >
# 8 Re: File Uploader
Yes I will read through it toroughly tonight :)
I_Love_My_Vans at 2007-12-4 16:54:22 >