Unable to upload attachments larger than 1 MB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fablau
    Member
    • Apr 2005
    • 36

    Unable to upload attachments larger than 1 MB

    Hello here,
    I have vBulletin 3.0.7 and I'd like to allow my users to upload .zip files up to 2 MB. I increased the allowed size of the .zip files in the Attachments > Extensions & Sizes panel up to 2 MB or 2.5 MB, but if I try to attach a .zip file larger than 1 MB vBulletin does nothing, nothing is attached and no errors are displayed.

    Any idea is very welcome!

    Thank you in advance.

    Sincerely,
    Fabrizio Ferrari
    Virtual Sheet Music®, Inc.
    Classical Sheet Music Downloads®
    http://www.virtualsheetmusic.com
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    In addition to the vB settings, the allowed size of the attachments depends on the PHP and MySQL configuration. You may need to check and change the upload size for both PHP and for MySQL. Note, you'll need to have root access to the server to do this (or have your host do it.) Make these changes to php.ini:

    upload_max_filesize = xM

    ..and my.cnf (or my.ini for Windows systems)

    set-variable=max_allowed_packet=xM

    Change it to the size ('x') you want in Megabytes. Restart the webserver and MySQL after making these changes.

    Also you might want to take a look at this for other settings that affect file uploads:

    I think that if you run a search on this board about 'memory_limit' and 'max_execution_time', one of my threads will show up :) Here are my settings before I continue: Server Type WINNT / PHP v4.2.2 File Uploads = On MySQL v3.23.54-nt PHP Maximum Upload Size 80M PHP Max Post Size 80M PHP Memory Limit N/A (even

    I have gone through this entire forum to see if someone else has reported this, but couldn't find anything so here goes. The problem I have sounds similar to other forum owners problem but produces the message This error occurs when I try to upload a file of ANY type that is greater than 992 Kb. As per the various other
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment

    • fablau
      Member
      • Apr 2005
      • 36

      #3
      Thank you Steve for your reply.

      I have already 2MB as limit on php.ini, but I am unable to find your suggested line to update my.cnf. Here are the lines I have on my.cnf:

      Code:
      [mysqld]
       datadir=/var/lib/mysql
       socket=/var/lib/mysql/mysql.sock
       
       [mysql.server]
       user=mysql
       basedir=/var/lib
       
       [safe_mysqld]
       err-log=/var/log/mysqld.log
       pid-file=/var/run/mysqld/mysqld.pid
      Any idea? Do I have to add the following line:

      set-variable=max_allowed_packet=xM


      Please, let me know.

      Thank you again.

      Sincerely,
      Fabrizio
      Virtual Sheet Music®, Inc.
      Classical Sheet Music Downloads®
      http://www.virtualsheetmusic.com

      Comment

      • fablau
        Member
        • Apr 2005
        • 36

        #4
        I checked my MySQL configuration and appears I have the following parameters:

        connect_timeout current value: 0
        max_allowed_packet current value: 16777216
        net_buffer_length current value: 16384
        select_limit current value: 1000
        max_join_size current value: 1000000


        So appears MySQL is ok. I will check other possible settings. Thank you.

        Fabrizio
        Virtual Sheet Music®, Inc.
        Classical Sheet Music Downloads®
        http://www.virtualsheetmusic.com

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74161

          #5
          What you can upload is also regulated by timeouts in both PHP and your Webserver. You can only upload what is possible in the time specified as dictated by your upload bandwidth.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            Originally posted by fablau
            Any idea? Do I have to add the following line:

            set-variable=max_allowed_packet=xM
            Add this under the [mysqld] section.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment

            • fablau
              Member
              • Apr 2005
              • 36

              #7
              Thank you Steve for your reply, I added that line and I was able to increase the max_allowed_packet variable to over 8MB. Unfortunately the problem persists, I am not able to upload files more than 1 MB large, and I really don't know why since I have set the following:

              1. Increased upload_max_filesize in php.ini to 3M

              2. Checked post_max_size and memory_limit both set to 8M in php.ini

              3. Added the LimitRequestBody 8000000 to httpd.conf

              4. Increased max_allowed_packet variable in MySQL to 8387584 (8M)

              5. Restarted both Apache and MySQL


              I am going to ask to my host. About Wayne's suggestion, I don't think can be a bandwidth issue since I have a dedicated server with plenty of bandwidth, anyway I'll ask them.

              If you have any other idea, I will be glad to hear form you.

              Sincerely,
              Fabrizio
              Virtual Sheet Music®, Inc.
              Classical Sheet Music Downloads®
              http://www.virtualsheetmusic.com

              Comment

              • fablau
                Member
                • Apr 2005
                • 36

                #8
                Guys, it works now! I kept to upload the same file and didn't work, then I tried to upload adifferent file and it worked. Now I am able to upload files larger than 2 MB.

                Thank you again for your precious help.

                Sincerely,
                Fabrizio
                Virtual Sheet Music®, Inc.
                Classical Sheet Music Downloads®
                http://www.virtualsheetmusic.com

                Comment

                • Steve Machol
                  Former Customer Support Manager
                  • Jul 2000
                  • 154488

                  #9
                  Sorry, I've posted all the settings I'm aware of that would affect this.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...