Announcement

Collapse
No announcement yet.

Upload of file failed.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload of file failed.

    Many of my moderators (and now me too) have been getting this error, "Upload of file failed" when trying to upload files. These people were able to upload files before. Some are large files and some are small.

    Over the last few months this problem went from one mod to 2, now to all. All of the user group options are correct.

    I use the file system, and place the files in a file on my server. This has worked fine for a while also in the past. I have recently switched to a dedicated server, but this problem started on the shared server several weeks ago.

    I went to the forums and searched and found this thread;
    http://www.vbulletin.com/forum/showthread.php?t=247031&highlight=Upload+file+failed

    I am hoping I can get the same analysis from you all on my system. I did enable phpinfo, and ran the upload diagnostics, and all showed ok.

    I changed the "upload max file size" from 2mb to 8mb on the server.

    I have made certain that attachment (file system file for attachments) is set to chmod777.

    The comments from moderators when trying to upload files are;

    "Well I tried again this morning...no go. Now instead of "upload failed" or "invalid file" it says what I posted yesterday..."not a post valid link, notify the administrator".

    vBulletin Message
    Invalid Post specified. If you followed a valid link, please notify the administrator


    Upload of file failed. "
    ---------------------------

    I have a support ticket opened on this. Any help is really appreciated.

    I'm wondering if it can be something to do with using a file to store the attachments. Maybe I should change it to the database. Is this recommended to try, would it hurt anything to try it? It moves the files to the database and thats it right?

    also another thought, could it be any of the hacks i installed. i suppose i could disable them one by one and check that too.

    hacks installed are;
    ibproarcade for vBulletin - version 2.6.5
    members who have visited - vers 4.4.3
    members who are using flashchat - version 4.4.6
    flashchat integration - version 3.55
    active link security hack - vers 5.2
    marquee system - vers 1.0.5
    Last edited by jessej; Tue 6th Nov '07, 8:29am.

  • #2
    I couldn't follow this. What is the situation now?
    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


    • #3
      Originally posted by Steve Machol View Post
      I couldn't follow this. What is the situation now?
      Sorry Steve. It did get somewhat convoluded.

      The problem is that when trying to upload files we are getting errors that don't tell me what the problem is. I have checked and rechecked file permissions (chmod777 on the attachment file), and I have bumped the max upload file size from 2mb to 8mb. We get "UPLOAD FAILED" mostly, but other messages are also coming up on us.

      I have a support ticket opened and Colin says he isn't sure what this is. I am just trying to put the problem out there in hopes that someone will have a clue on it.

      Also, I was thinking that maybe I should try changing from storing attachments on the file system to storing in the database to see if that changes the picture any. I wanted to know if this is easy to do. We have many attachments.

      Thanks alot for any help with this. jessej

      Comment


      • #4
        What happens when you try the Upload diagnostics?

        Admin CP -> Maintenance -> Diagnostics -> Upload

        Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

        Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled
        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


        • #5
          Originally posted by Steve Machol View Post
          What happens when you try the Upload diagnostics?

          Admin CP -> Maintenance -> Diagnostics -> Upload

          Enable phpinfo in the Admin CP, then provide the URL to your forums. This may help us troubleshoot this problem.

          Admin CP -> vBulletin Options -> Server Settings and Optimization Options -> Public phpinfo() Display Enabled
          www.ftaprosupport.com/forums

          I have set the Public phpinfo() Display Enabled to YES.

          Thanks again for the help. This is a good one, and if you can figure out what this problem is I will be for one, very happy, and for another, in awe of you. LOL Thanks!

          Comment


          • #6
            hi,

            On your server are these security releated options enabled ?
            • SAFE_MODE
            • openbase_dir

            PHP safe mode can be disabled in php.ini (do not forget to restart your server after you have modified this file) the second does not need to be disabled however you should create a "/tmp" directory in your webroot directory and give it appriciate permissions

            Comment


            • #7
              Originally posted by DelphiVillage View Post
              hi,

              On your server are these security releated options enabled ?
              • SAFE_MODE
              • openbase_dir
              PHP safe mode can be disabled in php.ini (do not forget to restart your server after you have modified this file) the second does not need to be disabled however you should create a "/tmp" directory in your webroot directory and give it appriciate permissions
              In the php.ini file, safe mode is set to OFF, and the other I'm not sure about. Need to look and don't have SSH here at work at the moment.

              I also don't have a /tmp dir created as I wasn't running in safe mode, I don't think. Steve may have a look and let me know if I am wrong. That's possible. LOL

              Comment


              • #8
                You have open_basedir restrictions and safe mode on your server. To get uploads to work you need to create a 'tmp' subdirectory under your httpdocs directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

                /var/www/vhosts/ftaprosupport.com/httpdocs

                Also the php.ini setting for 'upload_tmp_dir' is empty. It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777. You will also need to restart Apache after making this change.
                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


                • #9
                  Originally posted by Steve Machol View Post
                  You have open_basedir restrictions and safe mode on your server. To get uploads to work you need to create a 'tmp' subdirectory under your httpdocs directory and chmod it to 777. Then in the Admin CP set "Upload In Safe Mode?" to 'Yes' and point the "Safe Mode Temp Directory" to that directory. If you placed the tmp directory in the right place, the path to the Safe Mode Temp Directory will be:

                  /var/www/vhosts/ftaprosupport.com/httpdocs

                  Also the php.ini setting for 'upload_tmp_dir' is empty. It's possible you (as root) or your host will need to edit php.ini and set 'upload_tmp_dir' to point to the full path to a directory on the server that is chmod'd to 1777. You will also need to restart Apache after making this change.
                  Wow, this is confusing me. If I look at the settings displayed on the admincp page, it shows that linux safe mode is there, so I assume it means it is ON. But I logged into my server as root and looked at my PHP.INI file last night and the safe_mode is set to OFF. Are these two different settings, or the same one?

                  I can log on as root later on and make these changes to the PHP.INI file. I just want to clarify; is the path that I will enter in the PHP.INI file the same as the path you have specified here ??
                  /var/www/vhosts/ftaprosupport.com/httpdocs

                  or will it be different? Can you give me an example of how this setting should look.

                  And THANK YOU very very much for this help.

                  Comment


                  • #10
                    Sorry the safe mode tmp directory will need to be:

                    /var/www/vhosts/ftaprosupport.com/httpdocs/tmp

                    And Safe Mode is turned on for your user as per your phpinfo page.
                    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


                    • #11
                      Also, I believe that you cannot store attachments in the filesystem at all with safemode on.

                      Comment


                      • #12
                        ok you guys. which is it, on or off? LOL

                        are we talking about two different settings here?

                        STEVE SAID:
                        " And Safe Mode is turned on for your user as per your phpinfo page. "
                        This is the phpinfo page setting you are talking about, right. And this is set on and off where?

                        ZACHERY SAID:
                        " Also, I believe that you cannot store attachments in the filesystem at all with safemode on. "
                        This is the Linux server setting you are speaking about, right? This is the one I mentioned is set to OFF in the php.ini file.

                        Is this right? I just need to understand this, and I can be thick headed, sorry, and thanks!

                        Comment


                        • #13
                          We are both right. I suggest you follow the instructions in post #8. You are not going to get anywhere with this until you do.
                          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


                          • #14
                            Tried all that was suggested, and the results are that I can upload (admin) just fine, where as before I was getting errors. My sup mods are still having this problem.

                            Steve can you go back and see if I made all of the changes correcty? I put the path mentioned above in the admincp and on the server. I did not put quotes around the path i put on the server. Should I have? I am completely lost as I really thought this was the fix.

                            Are there any logs that can be looked at? Is there a "trace" method we might use to trap any errors and view them?
                            Last edited by jessej; Wed 7th Nov '07, 12:16pm.

                            Comment


                            • #15
                              You need to move your attachments back into the database, or remove safemode.

                              Comment

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