bbPress

Simple, Fast, Elegant

bbPress plugin browser »

bbPress Attachments (0.1.11)

Download

Version: 0.1.11

Last Updated: 2008-9-4

Requires bbPress Version: 0.9 or higher

Compatible up to: trunk

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5)

Your Rating

Author: _ck_


  1. Thank you for your time!

    My error:
    [failed] picture.jpg (136.9 KB)

    My path in your PHP code:
    $bb_attachments['path']="http://www.mysite.com/dir/dir/dir/uploads/";

    Questions:
    1. Is the path to be relative to the posting page, plugin file, etc . . ?
    2. Where can I put "?bb_attachments_diagnostic"; to debug?

    Details:
    - chmod: 777
    - does catch file size; if exceeds max
    - PHP 5

    Posted: 3 months ago #
  2. No, path is the local file path, not the URL.
    Should be something like:
    /home/username/dir/uploads/
    or
    /www/username/dir/uploads/
    but can vary.
    This is the path you'd see in your FTP program for example.

    Posted: 3 months ago #
  3. I successfully configured the path on a Network Solutions shared hosting enviroment using the document path I found while reading a plugin error message. Network Solutions advertises /htdocs as the document root for PHP files. I am using something very similar to:
    /data/12/3/456/789/0123456/user/7890123/htdocs/dir/dir/dir/uploads/
    Thank you once again!

    Posted: 3 months ago #
  4. You also probably could have gotten it from phpinfo() but I'm glad you figured it out. It's somewhat strange the plugin could not figure it out itself, they might be using some kind of weird NFS filesystem.

    Posted: 3 months ago #
  5. I don't suppose you were able to figure anything out regarding the errors I listed on the previous page, were you?

    Posted: 3 months ago #
  6. stitzelj, I need to know the real error that's causing the headers already sent error. When the error occurs, do a "view source" on the page and see if there is another error hidden in the source that preceeds all the other errors.

    Posted: 3 months ago #
  7. I'm not sure I understand. When I load the multi-page thread that has attachments (http://reclaimercomic.com/forum/topic.php?id=7), the first page loads fine. When I try to navigate to the second page, what I get is an empty page, with the exception of this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/opendial/public_html/comic/forum/my-plugins/bb-attachments/bb-attachments.php:490) in /home/opendial/public_html/comic/forum/bb-includes/pluggable.php on line 228

    Viewing the source shows no additional information.

    Posted: 3 months ago #
  8. If it helps, the error appears after bbPress sends a query involving calling the bb-attachments plugin. I was just informed that the error appears after someone types a reply to a thread (any thread) and clicks 'Submit.'

    Posted: 3 months ago #
  9. Unfortunately I don't have the time to debug this for a few days (and it's really strange no-one else reports the same problem) but do me a favor and look at each of your plugin source and check to make sure that there is no white-space before the opening <?php at the top or anything after the last ?> at the bottom. That's sometimes the cause, though this might be more complex.

    Posted: 3 months ago #
  10. Checked them and even deactivated all plugins and then re-activated bb-attachments by itself. It generated a fatal error warning but still activated, the error persisted in the forum, and then generated again in the plugins dashboard menu when I deactivated the plugin. So, I'm really not sure what's causing the issue.

    And no problem on the delay on the debugging. I'm not really in any hurry.

    Posted: 3 months ago #
  11. Ok, I figured it out. What mucked things up in the first place (I just realized a few moments ago) is that I modified the permissions for who can download attachments to allow unregistered members to to download. The plugin was active when I did this, and that was when the errors started. What I've determined is that you have to deactivate the plugin, modify the permissions, then reactivate the plugin. No problems after that. Just a little quirk with the plugin that you may want to make note of. :) Sorry for the headache.

    Posted: 3 months ago #
  12. Well I appreciate the report but that shouldn't be. You should be able to change the permissions on the fly even without deactivating/activating. It's just a string.

    There is a chance the process you just went through fixed something else though. In the end what counts is it's working for you without errors so I am glad to hear it, enjoy.

    Posted: 3 months ago #
  13. Yeah, that's what I figured, which is why I didn't think of checking that until just now. It is the only thing in the plugin that I modified. I'm just curious if the issue is replicable in another environment or if it's just something with my own setup that's creating a conflict. But yeah, it seems to be working smoothly at the moment.

    Posted: 3 months ago #
  14. stroem

    Member

    I have a bbPress 0.9.02 with plugin : bozo 1.0 , signature 0.1.9 , polls 0.5.4 and attachments 0.1.2 activated , on a Fedora 8 with php 5 .
    I have the dir on /home/stroe/bb-attachments with chmod 777 ( and I edit the bb-attachments.php for that ) , everythings it is OK , plugin work (?!) , but when I click on button "Upload" , I get a "seck1.gif (25.6 KB) error: failed" . And I have no attach to the post , but the error .
    In phpMyadmin I have a database with a table "bb-attachments" with records ( id time , size , name , etc ) but status 2 and download 0 ! for all my try ....
    What I did wrong ? ( sorry for my english )

    Posted: 3 months ago #
  15. Error #2 is either a db write failure or a failure to copy/move the file from the temporary filename/directory to the destination (bb-attachments/)

    Since you are saying you do have a listing for the upload in your db, that means it's the second kind of failure.

    What exactly do you have $bb_attachments['path']= set to?

    Posted: 3 months ago #
  16. stroem

    Member

    Thanks _ck_ ( you are the best )
    This it is the only one modification made for bb_attachments.php :
    $bb_attachments['path']=dirname($_SERVER['
    DOCUMENT_ROOT'])."/home/stroe/bb-attachments/";
    and I chmod 777 this dir ( where stroe it is a regular dir user
    from my Fedora , not accesible from web )
    I use ISP Config ( perhaps I should use /var/web/web1/user/web1_stroe dir ???? but here it is the email users defined in ISP )
    Thanks a lot !

    P.S. I made translation for bbPress 0.9.0.2 into romanian ( not the best I can , but ....it is the only one ! ) , how I send to you to post somewhere ?
    - the existing translation is 0.8.3 (?) .... work with 0.9 but incomplete

    Posted: 3 months ago #
  17. Okay well there's your problem, you don't need the dirname part if you are going to specify the full exact path. Make it like this:

    $bb_attachments['path']="/home/stroe/bb-attachments/";

    Typically dirname($_SERVER['DOCUMENT_ROOT'])
    should actually already be /home/stroe but you can do it either way.

    Posted: 3 months ago #
  18. stroem

    Member

    No . I test with ['path']="/home/stroe/bb-attachments/"; ...but the same error 'failed' , status 2 , download 0 in database !!!
    But the plugin work ! if I try with a big size , I have another message 'denied size' .
    I think that my server cannot upload ? but in FTP ( accesing directly this dir with IE , with my user & password ) I can upload the file !
    ( Fedora with proftp ) = and when I access with IE , I wrote 'ftp://www.mycompany.ro/bb-attachments' & I provide user and password , I put the file , I delete the file , work !

    Posted: 3 months ago #
  19. No the size failure is because it can see the temporary file size.

    We're almost there, the problem is definitely just your path.

    What does phpinfo think your home directory path is?

    Maybe try your idea:

    $bb_attachments['path']="/var/web/web1/user/web1_stroe/bb-attachments/";

    Some hosts have weird paths because of how their filesystem is setup.

    Posted: 3 months ago #
  20. stroem

    Member

    Succesful !
    I use the path from ISP Config /var/www/web1/etc .... and work !
    I think that ISP Config override the user ( from /home ) from Fedora setup ....by the way , ISP tell me "e-mail users" for this path ! in fact , they are the system user ! strange !
    Probably because I'am a novice for Linux ! ( but I learn ... )

    Thanks _ck_ , thanks a lot for your great work and time !

    Really don't need romanian translation ? I don't know where to put for everyone !

    Posted: 3 months ago #

RSS feed for this topic

Add a Comment »

You must log in to post.

Code is Poetry.