hi everyone,i am having a problem with the maximum file upload
i have read the forums about the maximum file upload and i went to
php.ini to change the maximum file upload from 2mb to 3mb
but if i upload 2.6mb file still the upload file doesn't work
can you please help me with that.

if you are uploading through the browser then perhaps you have a html input field that is prevent the larger files from being uploaded. On most uploading examples you will see this is a line of code:

<input type="hidden" name="MAX_FILE_SIZE" value="100000" />

(100KB file limit)
But what you want is this:

<input type="hidden" name="MAX_FILE_SIZE" value="3000000" />

(3000KB/3MB limit)
So search for that line of code and make sure it is 3000000 (with 6 zeros on the end).

hi cwarn23
i have that line of code in my index so when i execute php.info function within a
web server still shows upload_max_filesize = 2mb.what can should i do restart
apache and what inpact will pose to the program that using apache.

thanks

hi cwarn23
i have that line of code in my index so when i execute php.info function within a
web server still shows upload_max_filesize = 2mb.what can should i do restart
apache and what inpact will pose to the program that using apache.

thanks

Try adding the following line of code to the top of your file and confirm if what I said in my first post is true (line needed replacing) or not.

ini_set('memory_limit','3M'); //3 Megabites

If you place the above code at the top of your php file it will overright the default memory limit.

problem with the maximum file upload
i have read the forums about the maximum file upload and i went to
php.ini to change the maximum file upload from 2mb to 3mb
but if i upload 2.6mb file still the upload file doesn't work
can you please help me with that.

hi cwarn23
Thanks very much it works perfectly both ways.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.