Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Progress bar for Attachments 2 (and large uploads)

edited November 2007 in Vanilla 1.0 Help
Hey everyone, this is my first time posting to the Lussumo official boards... I've got my own installation of Vanilla going and so far it's by far the best and most easily customizable board I've ever used (and I've gone through quite a few) - here's my dilemma: I want to use my forum to give budding musicians the ability to make posts and upload mp3s of their tracks so other people can listen easily - I've got more than enough server space and bandwith to accomodate this, but unfortunately when I try to upload a large file (6 mB) Vanilla spits out an error and nothing happens. I was wondering if anyone else has run into this problem? I've looked up about problems with uploading large files with PHP (I've seen it done before, so I know it's possible), and I know there are classes out there for the implementation of an upload progress bar, but most of it is greek to me, so I figured I'd check her before going any further. Any comments would be appreciated.


  • Options
    There is a setting in the Attachments option for file size.
  • Options
    even with the file size variable set appropriately Vanilla still spits out these errors:

    Notice: Trying to get property of non-object in Vanilla.Control.CommentGrid.php
    Notice: Trying to get property of non-object in comments.php

    I see creativecomponent had the same problem in this thread
  • Options
    Have you tried uploading smaller files? Does that work? PHP has an upload limit as well, which you have to change in your PHP config file. I could see if I can add a progressbar to the extension.
  • Options
    Smaller files do work - I'm currently looking into changing the server's configuration to allow larger uploads, I'll get back to you if it works.

    There are a few classes out there for giving PHP uploads a progress bar, here and this one seems much better... asynchronous uploading, but it requires a perl script... not sure if there are any better solutions
  • Options
    There have been a few cludgy ways to build PHP progress meters in the past. A recent hook has been added to PHP 5.2 to enable native progress meter support. It is fairly easy to use. Unfortunately, you do need PHP 5.2 or higher for it to work. But ... Manuel Lemos (the guy who runs the PHPClasses site you reference in one of your links) ported the hook to PHP 4 (4.3.11 and 4.4.4). He also has a good article on the subject :

    File upload progress meter for PHP 4 at last

    The upload progress extension for PHP 5.2 can be found here :
    There seems to be other ports too - follow links in this example :
  • Options
    i have the same problem,but i have no idea of the things you just refer to.are there any easy ways or can you tell me the detailed steps.
This discussion has been closed.