Can I change upload_max_filesize ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan
    Senior Member
    • Mar 2004
    • 1229

    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
  • JackT
    Junior Member
    • Nov 2006
    • 16

    #2
    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.

    Comment

    • AndrewT
      Administrator
      • Mar 2004
      • 3653

      #3
      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.

      Comment

      • Jonathan
        Senior Member
        • Mar 2004
        • 1229

        #4
        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

        Comment

        • AndrewT
          Administrator
          • Mar 2004
          • 3653

          #5
          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.

          Comment

          • Jonathan
            Senior Member
            • Mar 2004
            • 1229

            #6
            Originally posted by AndrewT
            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

            Comment

            • AndrewT
              Administrator
              • Mar 2004
              • 3653

              #7
              Of course

              Comment

              Working...