No announcement yet.

Upload of file failed

  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload of file failed


    I tried to uploaded a 3MB PDF file but got 'upload of file failed' error. In forum admin, the max pdf upload size is set to 20M. In php.ini,

    upload_tmp_dir = /home/hipgirlc/public_html/forums/tmp
    upload_max_filesize = 5M

    I can upload files <2M which is the original upload_max_filesize in php.ini. I changed upload_max_filesize from 2M to 5M and upload_tmp_dir from null to /home/hipgirlc/public_html/forums/tmp.

    /home/hipgirlc/public_html/forums/tmp is set to 'drwxrwxrwx'

    Here is phpinfo:

    I didn't restart apache. I contacted the hosting company and ask them to restart apache because of php.ini change. I was told 'PHP doesn't run as a module of Apache so it doesn't need to be restarted for a change to the php.ini file. PHP loads your php.ini file dynamically upon a script running so any changes to it are immediate.' As you can see, phpinfo shows the change.

    Still cannot upload that 3MB pdf file.



  • #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)


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

    Note: Do NOT use MB, just M for the megabytes setting.

    You may also need to increase the memory_limit, max_execution_time and max_input_time variables in php.ini.

    Also you might want to take a look at this for other settings that affect file uploads:
    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.


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