Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.


This discussion is related to the Attachments addon.


  • All the new one does is store the attachment info in the database, rather than in a file (like PageManager does). I think once the new one was created, the old one was abandoned, and I wanted to be sure that wasn't the source of your troubles. As a short term fix, try not "forgetting" to put in a topic. :-P
  • Is there any way that I can sort multiple attachments by name?
  • Curious, how difficult would it be for me to allow posting comments w/o any text in the input box?

    As in, I'd like to have people able to upload images and not have to type anything out.

    I ask this because w/o any text in the input, you get this error:

    Some problems were encountered
    You must enter a value for the comments input.

    If this has already been brought up before, sorry that I missed it. I tried looking around though.
  • Is there anyway to actually view the attachments in a message rather than just having the link?
  • Okay got it! inlineimage...
  • Attachments used to work for me... and now it suddenly doesn't. I've tried reinstalling it a few times and without fail I get this message when I go to the attachments setting page:
    Notice: Undefined index: ATTACHMENT_DISPLAY_IMAGE_PROCESSING in /home/uncohel8/public_html/thesentinelsguild/extensions/Attachments/default.php on line 530
    Line 530 in default.php for me is this:
    $Selector->SelectedValue = $this->Context->Configuration['ATTACHMENT_DISPLAY_IMAGE_PROCESSING'];
    Can anyone help?
  • Hah, somehow I had downloaded version 1.4 of attachments. Not sure how that happened? Anyway, updated to 2 and it works like a charm.
  • Can we attachment any file type with this?
    I was trying to attach a MS Publisher file and got the following error:

    Some problems were encountered
    You are not allowed to upload ( the requested file type: application/
  • Ok - I'm having major grief with Attachments

    I've just moved to a new dedicated server, and attachments were not working, and seemed to lose the post when uploading:
            Some problems were encountered
    The requested discussion could not be found
    I've now managed to solve this by reading through this thread to find the link to this post which advises editing the Vanilla core to solve the problem (which works!)

    So, next up I discover that I can't now upload files.
            Some problems were encountered
    Failed to upload the file: continue.gif
    So, some playing around with phpinfo() leads me to discover that my upload_tmp_dir was not set!
    Very strange for a default install, but there you go. So I've edited that but now there's no luck either.

    Can anyone help? I have spent days on this so far...

  • Regarding my previous comments, we seem to have got to the bottom of the problem.

    It appears error reporting was OFF in this new installation, so I was getting no feedback at all with regards to the nature of the problem. Having made the changes to turn error reporting ON, I then got this error:

    Warning: move_uploaded_file() [function.move-uploaded-file]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/ owned by uid 48 in /var/www/vhosts/ on line 113

    To rectify the problem, my server admin had to go in and change the *ownership* of the folder. Here is his response, in case it helps anyone:
    It seems that when thta forum software created the folder it doesn't create them as the ftp user, it creates them with ownership by the apache process, so the ftp user isn't allowed to access them

    there is probably a long complicated way of rewriting the forum code to create them with the ftp user, but I have gone in via SSH and changed the ownership of those folders to the FTP user.

    To do this, (in case it comes up in future) you login via ssh, navigate to that folder (cd /var/www/vhosts/ and then change the ownership (chown [username] [foldername]) and you will be able to upload after that.
    I hope that helps someone.

  • And just when you think it's sorted, the same issue for other users.
    Any help anyone?
  • Is anybody wants to maintain this extension since Jazzman has not logged in since last november (2007)?
  • alright maybe I have missed the boat here. But I have succesfully installed the exension and can upload a test file to the server and that works fine. But how do I access the file after that? I don't see anything?
  • (Attachments # 123) I get this same problem, somehow Attachements is borking the url :/
  • I hope I haven't missed something here in the comments or in the Forum. I am facing the following problem:

    My Forum is a closed user group, no anonymous posting allowed, registration upon admin confirmation only. Some people in our community are developing software and want to make it available through the forum. However, the content-type tests seem to be annoying at best.

    After reading some code I have come to the conclusion, that content-type checking of uploads is a core feature and is enforced as long as extension developers use the offered api functions (I use the Attachment 2.1 with "Multi File Upload" and "Inline Images").

    So i went into library/Framework/Framework.Class.Uploader.php and commented out the content-type checking part.

    I know that checking content-types and file sizes might in most situations be desired on a public site but not always.

    Did I miss some configuration options?

    If not, would it be possible to make "turn off" content-type checking available or make it possible to use wildecards in content-types (something like this):

    $this->AllowedFileTypes = array (
    //all javascript files like text/javascript or application/javascript. ending doesn't matter
    // because it could be named anything anyway
    '*/javascript' => array('*'),
    // allow the following text files
    'text/* => array('css', 'js', 'txt', 'csv')
  • I get the following error message at the top of the page when trying to upload a file that is now allowed:
    Notice: Undefined property: DiscussionID in myfilepath/library/Vanilla/Vanilla.Control.DiscussionForm.php on line 124
    Anybody have any ideas why that would show up only then? If I upload attachments that are configured correctly in the ATTACHMENTS_ALLOWED_FILETYPES area, everything works great.
  • Alrighty, hopefully someone's already done this (crossing fingers)...

    Has anyone modified this Add-on to work with Amazon Web Services S3 file storage? I'm looking to move from local storage to online storage for my site and before spending the time to take this Add-on and modify it for this purpose, I figured I would ask first and save myself from the agony (if at all possible).

    If people aren't familiar with this and want to read more about it, you can point your browser here:
  • alrighty, it would appear the answer is probably no. I'll get started on it then :)
  • I have the same problem as #mwbarker in V.1.1.5a:
    Notice: Undefined property: DiscussionID "mypath"/library/Vanilla/Vanilla.Control.DiscussionForm.php on line 124

    Other thing is that, I have problem when I try to upload attachments larger than 1MB - many times while uploading page Hangs up and file is not uploaded, I must refresh page and upload again.
  • EDIT: Nevermind, I fixed it. php.ini wasn't doing what it was supposed to.

    I am getting the following error messages when trying to upload mp3 files:

    The file you attempted to upload (01-Welcome.mp3) was empty. You are not allowed to upload (01-Welcome.mp3) the requested file type:

    Things I have already done:

    1. Added the mp3 mime type to the default.php file
    2. Fixed the "MineType" typos
    3. Increased the size limit for uploads both in the Vanilla extension and in my php.ini file.

    I also find it odd that it doesn't give me a MIME type with the error, and that it claims the file was empty.
  • Like other users, I had a problem with file types not allowed, and I get PHP error messages (like mwbarker and vaniller) when trying to upload files of an unallowed type. Here's a description of the bug and the turnaround I used.

    I'm using Vanilla 1.1.5a and Attachments 2.1. I uploaded a few .pdf files sucessfully, but at some point, when trying to upload a new .pdf file, I got the following error message:

    Some problems were encountered

    The file you attempted to upload (NameOfFile.pdf) was of type "application/download", but the file extension "pdf" did not match the accepted extensions for this type of file: rar, RAR

    I got the same with other .pdf files.

    When trying again I got the two additional PHP error messages at the top:

    Notice: Trying to get property of non-object in myvanillapath/extensions/attachments/default.php on line 703

    Notice: Undefined property: stdClass::$DiscussionID in myvanillapath/library/Vanilla/Vanilla.Control.DiscussionForm.php on line 124

    I don't know why my pdf files are classified as "application/download". When checking them in Windows, they are perfectly normal pdf files (they start with the %PDF1.3 string). I don't know whether the browser or the server assigns a different type, nor why.

    I turned around the problem by allowing files with extension "pdf" to be downloaded as application/download types. For those who need it, here's how to do it: find the following line in extensions/Attachments/default.php:

    $Context->Configuration['ATTACHMENTS_ALLOWED_FILETYPES'] = array (
    Below you'll find lists of allowed extensions for each file type. In my case I changed:

    'application/download' => array('rar', 'RAR')

    'application/download' => array('rar', 'RAR', 'pdf', 'PDF')
    If you have a problem with another file type, add a line of code for the MIME file type Vanilla mentions in the error message (text/rtf, application/download, etc.); or if there is a line already, add the relevant extension to the list as above.
  • I installed Attachments-2.1 and have my "Upload Path" (in Attachment Settings) defined as to '/vanillaforum/uploads/Attachments.' When trying to upload a jpg file I get a message "
    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed."

    Any assistance would be appreciated.
  • I am having quite a bit of trouble with this plugin. Although it's a good idea and stuff it has quite a few errors. Now I'm no coder or anything and it might just be something that I'm doing wrong. My forum is located here.

    One problem I'm having is when I tried to upload a zip folder which was about 9MB onto a discussion that I tried to create it just reloaded the 'Start New Discussion' page and didn't make the discussion or upload the file. I've tried putting the max file upload to 999999 bytes but it still didn't work.

    Another issue I'm having with this is when I tried to upload a zip folder yesterday it said:

    The file you attempted to upload ( was empty.
    You are not allowed to upload ( the requested file type:

    OK so these are the problems I'm having. I've tried messing about in the default.php file but again, I'm not very good with code so I didn't have a clue to be honest on what I was doing. Anyone have any idea about what's going on? Would appreciate an email to explaining what's going on but still would be good if you could just tell me on here. Need to get this fixed asap for a perfect forum :)

  • The Extensions works great... Except I also want to be able to host files larger than 64M.
    I found in the php.ini there was a 64M limit in two places:
    upload_max_filesize = 64M

    I bumped these up to 300M to no benefit. I also upped the Extension setting for max file size to 300M.
    All I get when I try to up a file larger than 64M is a new Disscusion screen. No errors are ever posted. I did read in the thread where there is an edit to the VannilaDisscusionForm to show the error, but that edit was already in the build.

    Attachements 2.1
    Vannilla 1.1.5a

    Thanks in advance

    I edited the wrong php.ini.
    I needed to edit the php.ini in the c:/xampp/apache/bin, then restart the services in WinXP

    Thanks Guys!
  • New problem,

    I can not attach .tgz's
    I have added the tgz extension to the list, but I still get an error in regards to get object data and an error on line 703
    (original line had 'gz' and 'tar.gz'. I received the error list below so I removed the 'tar.gz' and added 'tgz'. I still received the error listed below.)

    Cut-n-paste of error displayed:
    Notice: Trying to get property of non-object in C:\xampp\htdocs\Vanilla\extensions\Attachments\default.php on line 703
    Notice: Undefined property: stdClass::$Context in C:\xampp\htdocs\Vanilla\extensions\Vote\default.php on line 38
    Notice: Trying to get property of non-object in C:\xampp\htdocs\Vanilla\extensions\Vote\default.php on line 38
    Fatal error: Call to a member function NewContextObject() on a non-object in C:\xampp\htdocs\Vanilla\extensions\Vote\default.php on line 38

    from default.php

    Cut-n-paste of add extensions from default.php
    'application/x-gzip' => array('gz', 'GZ', 'tgz', 'TGZ'),
    'application/download' => array('rar', 'RAR', 'zip', 'ZIP')

    Cut-n-paste of default.php (starting at line 700)
    // Save Attachments
    function DiscussionForm_SaveDiscussionAttachments(&$DiscussionForm) {
    $Discussion = &$DiscussionForm->DelegateParameters['ResultDiscussion'];
    $AttachmentManager = &$DiscussionForm->DelegateParameters['AttachmentManager'];
    $AttachmentManager->DiscussionID = $Discussion->DiscussionID;
    $AttachmentManager->Comment = &$Discussion->Comment;

    Any ideas why uploading this particular file extension is giving me problems?
    Would of been nice if I could attach the default.php file in this Forum.
  • That's what tags are for ;)
  • To say I'm noob in html is an understatement.

    Im assuming your saying that I could of used the tags to up the default.php?

    Has anyone had any luck with attaching .tgz's with this extension?
    I just took the .tgz and put it in a zip file and upper that but I would like it to be easier for the end user.

    Thanks for the assist!
  • Sorry, I was obscure, I was referring to the fact that you can effectively "upload" a PHP/HTML file to these forums by simply copying the contents of it and pasting it inside tags. Although, yes, you could also link to a file uploaded elsewhere, that's a perfectly valid way to do it too! :) I've not tried TGZ files myself, but if you can upload other files alright, you should be able to add support for the TGZ files by looking at the error message yoyu get when it fails on the TGZs and a little creative copying and pasting in the attachments default.php.
Sign In or Register to comment.