Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: PHP.INI What to add to fix large file upload issue  (Read 2538 times)

0 Members and 1 Guest are viewing this topic.

pyrotech1620

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
PHP.INI What to add to fix large file upload issue
« on: March 30, 2008, 11:04:04 pm »

Alright I searched for awhile and couldn't find a simple answer.. There is tons of posts about this setting and that but I couldnt find one that explained them all and showed a sample of what it should look like. So by putting everything together and testing a bunch of different settings I finally got it.. For those having trouble with uploading large files using the web upload here is what you need to do.  Mind you each web hosting company is different and you need find out by them how to get this done.

I can create my own php.ini file each directory with the company I host with.. I created a php.ini in the same directory I installed CPG to.. If you don't know if your web hosting company is setup this way give it a shot to see if it works.. Here is the contents of php.ini file..

max_execution_time = 3600
max_input_time = 3600
memory_limit = 100M
upload_max_filesize = 100M
post_max_size = 100M



The values listed will allow you to upload 10 images each atleast 9MB in size. As long as you can upload 100MB within 1 hour. Below is a break down of php.ini changes

max_execution_time = 3600  *This is in seconds.. Maximum execution time of each script*
max_input_time = 3600        *This is in seconds.. Maximum amount of time each script may spend parsing request data*
memory_limit = 100M           *Size in MB.. Maximum amount of memory a script may consume"
upload_max_filesize = 100M  *Size in MB.. Maximum allowed size for uploaded files.*
post_max_size = 100M         *Size in MB.. Maximum size of POST data that PHP will accept.*

With the first 2 settings you shouldnt have any problems with time.. That will allow the page to upload/run for 1 hour.. The next thing to figure out is the M size settings.. Its pretty simple.. For each file you upload you need atleast that many Megs.. So if your uploading 10 1MB files then those should be all set for atleast 10M.. If you uploading 10 2MB files each of those should be 20M.. Get the idea.. I have mine set for 100M just to prevent any issues.. But then again I can edit my own PHP.INI file.. For those who can't edit their own php.ini the hosting companies might find 100M overkill as well as the 3600 time..
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.