Attachments not working after 2.2.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • [cs] Andy
    Member
    • Mar 2002
    • 36

    #31
    Ok try editing these templates

    newreply
    newthread
    modifyavatar

    and change the instances of

    $enctype

    to:

    enctype="multipart/form-data"

    Comment

    • Decoder
      Member
      • Feb 2002
      • 77

      #32
      ok i have 2.2.4 and just installed
      and i have the same probs too

      Comment

      • Decoder
        Member
        • Feb 2002
        • 77

        #33
        where do i find those templates???
        do i change the .php files directly?
        or something in the admin CP?

        Comment

        • [cs] Andy
          Member
          • Mar 2002
          • 36

          #34
          ok you can find the templates in your admin cp, once your in the cp on the left scroll down to templates, then click on modify then click expand list then scroll down to New Posting Templates then expand it and you will find 2 of the templates there then look for User Option Templates you will find the last template to edit in there

          Comment

          • jamoss
            Member
            • Apr 2002
            • 67
            • 4.2.5

            #35
            Me too

            My attachments just stopped working a half hour ago. Getting 'not a valid .jpg or .gif file' error.

            Edited the templates you mentioned above and replaced the $enctype code. Still not working.

            ###UPDATE####

            It was a temp directory that was in a partition that was full. Check that if you're having trouble uploading attachments.

            Jennifer.
            Last edited by jamoss; Tue 9 Apr '02, 10:41am.

            Comment

            • xoRFa
              New Member
              • May 2002
              • 1

              #36
              having saving problems

              I've tried changing the template and file_uploads is on... I have no idea what the problem might be.. perhaps an upgrade of PHP is needed?

              - http://www.mediaorgy.com/phpinfo.php
              - http://www.mediaorgy.com/board/
              - PHP v4.0.6
              - MySQL v3.23.36
              - Linux 2.4.2

              Comment

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

                #37
                Re: having saving problems

                Originally posted by xoRFa
                [B]I've tried changing the template and file_uploads is on... I have no idea what the problem might be.. perhaps an upgrade of PHP is needed?
                In your case, Safe Mode is 'on' and you're running Plesk. Perhaps this thread will help:

                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

                • Elentari
                  Member
                  • May 2002
                  • 34
                  • 3.7.x

                  #38
                  Ive recently installed vb225 ... and just tonight noticed that attachements werent working. (hadnt tried to post them before)

                  the url of the board is http://www.christiansurvivors.com/forums

                  I came over here, and Ive tried the template fix - but it still wont upload anything!!

                  I'm not getting an error message - it just looks like its uploading them fine, then doesnt show up on the thread.

                  Any more ideas?

                  El x

                  Comment

                  • angel2b
                    New Member
                    • May 2002
                    • 13

                    #39
                    Same deal

                    Weird; I get the same thing. Odd that this. And I *know* uploads work fine, as people can upload avatars fine too. Let me attach my avatar here; and if it works, lol, you can tell me what you did, so we can do it too.

                    - Mark

                    Comment

                    • angel2b
                      New Member
                      • May 2002
                      • 13

                      #40
                      if it works, lol, you can tell me what you did, so we can do it too
                      Hmm, I guess that was a no-show.

                      - Mark

                      Comment

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

                        #41
                        Do you have a phpinfo.php file? If not create a text file with this content:

                        PHP Code:
                        <?php
                        phpinfo
                        ();
                        ?>
                        Upload it to your forum directory and post the URL here.
                        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

                        • angel2b
                          New Member
                          • May 2002
                          • 13

                          #42
                          Yikes,

                          I tried to upload something and view it; and this is what I got emailed back,

                          Database error in vBulletin 2.2.5:

                          Invalid SQL: SELECT downloads FROM user WHERE userid = 1
                          mysql error: Unknown column 'downloads' in 'field list'

                          mysql error number: 1054

                          This isn't good.

                          This is quite serious. I just checked the database of a client of mine, who also has a vbulletin running; and the same thing. I checked the "user" table (with phpMyAdmin-2.2.6), and it is true; there is no column called "downloads".

                          P.S. The query occurs in attachemt.php, and is as follows:

                          $dl = $DB_site->query_first("SELECT downloads FROM user WHERE userid = $bbuserinfo[userid]");

                          - Mark
                          Last edited by angel2b; Thu 30 May '02, 6:13am.

                          Comment

                          • angel2b
                            New Member
                            • May 2002
                            • 13

                            #43
                            Yay! I solved it! )

                            I was bold enough, and just added a column of type "blob" to the user table; it worked! This MySQL query:

                            alter table user add column downloads BLOB;

                            N.B. The "downloads" field is NOT part of the standard attachment.php. It comes with one of the many hacks.

                            I also added this to my php.ini,

                            file_uploads = 1
                            upload_tmp_dir = /tmp

                            As without it, it would not do anything. Can't believe I actually got it to work.

                            It would be nice, though, if PHP actually cleaned up the files in /tmp; but hey, I'll find a way around that too.

                            P.S. In a vague memory, I remember an install option, somewhere, that asked me whether I wanted to keep uploads on disk, or in the database. I opted for inside. Maybe that is related.

                            /me, happy as punch.

                            - Mark
                            Last edited by angel2b; Thu 30 May '02, 7:02am.

                            Comment

                            • allenfox
                              New Member
                              • Sep 2002
                              • 3

                              #44
                              now I can't delete posts with attachments.

                              Originally posted by Ed Sullivan
                              Try this...

                              The fix is a pretty simple template modification. You need to replace:

                              $enctype

                              with:

                              enctype="multipart/form-data"

                              In the editpost, modifyavatar, newreply, and newthread templates. The editing instructions are the same as in http://www.vbulletin.com/forum/show...&threadid=41098 , except in step 4, you want to do the replacement specified above.

                              Great now file attachments work using this fix, but now my admins can't delete posts with attachments anymore.

                              I get the following error when trying to delete a post with an attachment.

                              Database error in vBulletin 2.2.7:

                              Invalid SQL: SELECT DISTINCT attachmentid FROM post WHERE attachmentid IN (97,0) AND threadid<>'133'
                              mysql error: Got error 127 from table handler

                              mysql error number: 1030

                              Date: Tuesday 03rd of September 2002 02:11:34 PM
                              Script: http://www.gamerzedge.com/forums/forums/postings.php
                              Referer: http://www.gamerzedge.com/forums/postings.php

                              Comment

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

                                #45
                                By the way you did not need to use Ed's fix for 2.2.7.

                                Your problem is a crashed post table. Upload repair.php (it's in the 'extras' folder of the zip file) to your admin directory. Close your forums, then run it from your browser with this syntax:

                                repair.php?html=1&check=1

                                It everything reports 'Ok' then reopen your forums. If not, then run it again. The second time everything should report Ok. See if this fixes the problem.

                                If you have any more problems, please start a new thread. Thank you.
                                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...