Results 1 to 7 of 7

Thread: Can I change upload_max_filesize ?

  1. #1
    Senior Member Jonathan's Avatar
    Join Date
    Mar 2004
    Location
    Daytona Beach, FL / Rochester, NY / Coeur d'Alene, ID
    Posts
    1,229

    Default Can I change upload_max_filesize ?

    Is there anyway I can change the 'upload_max_filesize' from 2MB as listed
    under 'PHP Config' part of cPanel? I'd like to change it to something like 10MB.

    Just because alot of my photos are abit on the large size, so I usually can
    only upload 6 pictures at a time. I'm guessing this is due to the filesize limit
    of 2MB? So could I change this to a higher value? If so, how would I?

    Also a possibility is that the script is timing out due to the 30 second limit, right?
    Since my upload speed is aprx 30KB/sec that'd be about 900KB in the 30 seconds.
    So even if I had 2MB worth of files, would it not go through due to the 30 second limit?
    Or am I totally misunderstanding this?
    "How can someone be so distracted yet so focused?"
    - C

  2. #2
    Junior Member
    Join Date
    Nov 2006
    Location
    Waterloo, ON
    Posts
    16

    Default

    You cannot do it within cPanel, but if you make a file called php.ini within the directory where the script is executed:
    Code:
    upload_max_filesize = 2M
    max_execution_time = 120
    post_max_size = 8M
    Change the numbers to your liking, upload_max_filesize should be the same as post_max_size, assuming you are using a form field to upload pictures.

  3. #3
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,646

    Default

    Create a file named php.ini

    In the file, put the following line:

    upload_max_filesize = 10M

    You could also put (time in seconds):

    max_execution_time = 60

    Upload the php.ini file to EACH directory where the setting change is required. It will not automatically work recursively through subdirectories.

  4. #4
    Senior Member Jonathan's Avatar
    Join Date
    Mar 2004
    Location
    Daytona Beach, FL / Rochester, NY / Coeur d'Alene, ID
    Posts
    1,229

    Default

    Would setting 3 minutes (180s) as the maximum execution time be OK? For just
    uploading pictures? We're talking 10-20 MAX at a time, each between 75-250kb aprx.
    I just want to ensure the script will run long enough for my slow upload speed
    "How can someone be so distracted yet so focused?"
    - C

  5. #5
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,646

    Default

    That *should* be fine.

    Edit: Hah, Jack and I replied at exactly the same time You'll want to take his suggestion on the post_max_size too.

  6. #6
    Senior Member Jonathan's Avatar
    Join Date
    Mar 2004
    Location
    Daytona Beach, FL / Rochester, NY / Coeur d'Alene, ID
    Posts
    1,229

    Default

    Quote Originally Posted by AndrewT View Post
    That *should* be fine.

    Edit: Hah, Jack and I replied at exactly the same time You'll want to take his suggestion on the post_max_size too.
    Thanks, Andrew. Hoping you'll send me a nice email
    if it ends up causing looking like its causing problems - right ?
    "How can someone be so distracted yet so focused?"
    - C

  7. #7
    Administrator AndrewT's Avatar
    Join Date
    Mar 2004
    Location
    Tulsa, OK
    Posts
    3,646

    Default

    Of course

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •