Forum Moderators: coopster

Message Too Old, No Replies

Upload questions

         

anshul

6:32 am on Jun 2, 2005 (gmt 0)

10+ Year Member



I've a FORM to upload 20 files at one time, I want it upload 50MB without any problem. I need to set PHP execution to high time, I think, I use ini_set(). But, how can I specify maximum of 50MB, I've an array of 20 files in a FORM. Next I think, it's bad to allow 50MB, should I step-down to 10MB or what?

jatar_k

4:22 pm on Jun 2, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



that's quite a bit, if you are on a shared host you might not even be able to set it higher.

>> should I step-down to 10MB

I would, any timeouts would really mess up the script and you might also run into max execution time stopping the script as well.

coopster

7:18 pm on Jun 2, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member




/**
* A couple of PHP configuration directives must be set in the httpd.conf
* in order for the upload form to operate as designed. Although we set the
* maximum file size allowed to be uploaded in the form, that can be spoofed.
* We must still set the PHP directives, most of which are type PHP_INI_PERDIR,
* which means the entry can be set in php.ini, .htaccess or httpd.conf, but
* not in the script itself using ini_set(). Each of the directives in turn
* must be larger than the preceding directive in accordance with PHP:
* upload_max_filesize PHP_INI_PERDIR 2M
* post_max_size PHP_INI_PERDIR 8M
* memory_limit PHP_INI_PERDIR not enabled/must compile in
* We must also set the maximum time in seconds a script is allowed to
* receive input data during the POST file upload:
* max_input_time PHP_INI_PERDIR (default = 60)
*/

anshul

6:56 am on Jun 3, 2005 (gmt 0)

10+ Year Member



Since I'm using array of files, I need calculate if sum of total files' size not exceed 10MB or 50MB. How can I do that? If JavaScript can calculate, if user is doing wrong? As this is for cms, only Webmaster'll use it, so I think he may do maximum of 50MB at a time? Please discuss.

jatar_k

4:37 pm on Jun 3, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if it just the webmaster then just use ftp, I get that feeling of trying to re invent the wheel

why do they need web based upload?

anshul

6:50 am on Jun 4, 2005 (gmt 0)

10+ Year Member



More correctly, not a technically sound Web master. Just a busy ownner of Web site. He need cms. There are other users with lesser authorities, also. He may login cms himself or say to one of his assistants. They don't have an engineer in their office.

jatar_k

4:20 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



then why not just an existing cms as a solution?

anshul

6:55 am on Jun 14, 2005 (gmt 0)

10+ Year Member



Seen Mambo, Nuke, but they are huge. Our client want simple yet robust and just useful cms.
I always hope senior members of this great forum take some interest to share their knowledge.

jatar_k

4:09 pm on Jun 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



all i can suggest is to try and find something here

[cmsmatrix.org...]