The MU forums have moved to WordPress.org

Clue please - UPLOADBLOGSDIR (12 posts)

  1. gazouteast
    Member
    Posted 14 years ago #

    OK, a guy only has so many years to live, and as an older guy, I have less remaining than many. So, please ....

    Can someone give me a definitive example of what the path would look like that has to be put into the uncommented UPLOADBLOGSDIR entry in wp-config.php prior to upload and install?

    Am I correct in assuming that the crypic pointer in wp-config.php (that alludes to "remember to change WP_CONTENT too" points to the following settings from wp-settings.php?

    Also, could someone clarify if these following settings from wp-settings should be copied over to wp-config and reset (to change away from " blogs.dir " to a more sensible name)?
    1 define( "UPLOADBLOGSDIR", 'wp-content/blogs.dir' );
    2 define( "UPLOADS", UPLOADBLOGSDIR . "/{$wpdb->blogid}/files/" );
    3 define( "BLOGUPLOADDIR", WP_CONTENT_DIR . "/blogs.dir/{$wpdb->blogid}/files/" );

    I'm really starting to become very disillusioned with the lack of documentation for WPMU - maybe Donncha can handcuff Matt to a keyboard and get him to write some instead of globetrotting?

    Gaz

  2. andrea_r
    Moderator
    Posted 14 years ago #

    ...wow...

    "Can someone give me a definitive example of what the path would look like that has to be put into the uncommented UPLOADBLOGSDIR entry in wp-config.php prior to upload and install?"

    You don't edit the config prior to upload and install. If you want to change the upload directory from the defaults, you have to do that after installation.

  3. gazouteast
    Member
    Posted 14 years ago #

    Thanks Andrea

    That's one part of the answer that's been nagging away at me, and confirms what I thought (but is not 100% clear anywhere).

    Re: the bits I questioned about adding - can I safely assume that adding them to the config as <u>commented</u> lines pre-install will do no harm, and that the newly created wp-config.php will contain those same commented lines for editing?

    Am I right in assuming those three defines DO need put into the config after install?

    Following from that, I assume I then have to also manually rename the newly created blog.dir folder, to the same name I then edit into the wp-config.php and also assume that's what the cryptic pointer is aiming at?

    It's all too much fuzzy logic for a crusty old geezer like me. ;-)

    Gaz

  4. andrea_r
    Moderator
    Posted 14 years ago #

    "(but is not 100% clear anywhere)."

    I hate to disagree, but the part about not editing the config file is clearly stated multiple times pretty much everywhere. All over the forums, all over my site, in the codex under installing MU, and right at the top of the config file with a line if big asterisks around it. (these things: * )

    :)

    I need to be clear on some details tho, before I go handing out instructions. Are you trying to change the default uploads folder to something else? Because that's the only reason to edit those lines, and it's perfectly fine to do it AFTER installation. So you can be sure it's working smoothly before you try and break it. ;)

    (geezer in training)

  5. gazouteast
    Member
    Posted 14 years ago #

    LOL - you can't be a geezer, you have to be a geezette ;-)

    You meaning these lines?

    **************************************************************************
    * Do not try to create this file manually. Read the README.txt and run the
    * web installer.
    **************************************************************************

    It doesn't say "don't edit it" - it says "don't create one manually" - that's not quite the same thing.

    moving on ....

    (obfuscating what would be dead obvious giveaways to a site not ready to receive visitors) what I'm toying with after spending far too much of the last week here in the forums, is ....

    imagine a site for gardeners (mine's not but let's pretend), what I want is to -
    1. replace "blogs.dir" with "greenhouses" (note no period in the name)
    2. replace /files/ with /plants/

    Multiple reasons for this (which will become blindingly obvious when I finally get this site built) but the common one for most users would be SEO benefits - having topic related keywords as part of your URLs and folder trees ... well it's SEO-101 innit like?

    I'd like to bump the greenhouses up a level (alongside wp-admin, wp-content, wp-includes) if practicable - again for SEO / search-bot reasons, but have already lost too much project time on this already to start pushing the envelope too far.

    Hey - maybe we should nag Donncha to run a buddypress install here on WPMU ... and we could start a geezers and geezettes group?

    Off to bed in a mo, it's coming up to 2am here

    Gaz

  6. andrea_r
    Moderator
    Posted 14 years ago #

    Um, I understand what you'd *like* to do, but I'm compelled to point out there isn;t any *reason* to so it.

    Mostly because from the frontend of the blog, the users, the visitors, the SEO guys, the search engines... do NOT see the blogs.dir/ bit. That's purely internal. They get re-written with the htaccess rewrite rules when they are served up.

    Case in point:
    http://wpmututorials.com/plugins/featured-posts-plugin-and-widget/

    That post has two images in it. Check the URLS, there's no blogs.dir anywhere. (And yes, this is a blog on a WPMU install).

    You can change the /files/ bit in wp-config.php, but you'll also have to change the rewrite rules for it in htaccess.

    (no I haven't gotten around to writing up a tutorial for it yet :) )

  7. gazouteast
    Member
    Posted 14 years ago #

    You can change the /files/ bit in wp-config.php, but you'll also have to change the rewrite rules for it in htaccess.

    (no I haven't gotten around to writing up a tutorial for it yet :) )

    You should - judging by the angst and torment in these forums, it would probably be the most visited page on your site ;-)

    Right - I've installed fresh - leaving everything as default, images do not show in the post editor or on the site

    I've renamed the blogs.dir and the files folders in cPanel and set their paths in wp-config.php

    Now images show if I use the long file path ( http: //site/wp-content/blogs/bog#/uploads/year/month/filename

    but that's not what I want is it? I haven't got the failtest idea how to rewrite the htaccess - I did try what looked like the obvious thing to do and it didn't work - all images disappeared

    Now I have the issue that images being uploaded have the old /files/ folder embedded in their url in the database, I can change that with phpMyAdmin, but outside of testing, that's not practicable.

    <rant>
    It REALLY should NOT be this difficult - apart from any consideration posted earlier I want the user content path renamed on the server for SECURITY reasons to at least put a small extra obstacle in the way of hackers - having followed instruction to the letter and made public_html 0777 for the install, the www folder is now non-changeable back to 0755 - I am very close to having to get the hosts to scrap the entire hosting space (and it's a reseller account with client sites active) therefore I am mightily pee'd off with WPMU right now.
    </rant>

    another issue is surfacing - I get the following in my error log -

    PHP Warning: readfile() has been disabled for security reasons in /home/server-user/public_html/wp-content/blogs.php on line 127

    lines 125-127 =

    125. // If we made it this far, just serve the file
    126.
    127. readfile( $file );

    I mean, come on, what's happening here - is WPMU asking the server to do something that's a major security risk? I wouldn't have thought that reading a file (especially an image file) is a threat to the server, but hey, who knows nowadays?

    If I cannot get the basics working tonight, I'll spend tomorrow trawling sourceforge for an alternative solution I think.

    Not a happy bunny - completely vanilla clean install broken out of the box - hurrumph.

  8. gazouteast
    Member
    Posted 14 years ago #

    Andrea - this is what I'm getting (as a "case in point") ;-)

    http://craftcarts.com/2009/11/hello-world/

    This is about the 10th or 11th reinstall for this site, 100% free of plugins or tweaks, and buddypress has been nowhere near this version of the install

    Have a look at that post, it contains all the notes you'll need

    Gaz

  9. andrea_r
    Moderator
    Posted 14 years ago #

    I have read all your forum posts, even if I haven't responded. And yes, I've read the above posts and the blog post.

    Those are indeed familiar issues, and I'll tell it to your straight:

    It is definitely YOUR SERVER.

    I know there's other posts where you didn't want to hear that, but there it is.

    GD has to be installed on the server. It is not a special add-on to an Apache server, it's pretty damn standard. Tell you what - go to wpwebhost.com, signup for the buddyplan and ask for the free month trial. Hell, they will even install MU for you at no extra charge.

    If you get the same exact issue over there, I will happily eat my hat.

    :)

  10. gazouteast
    Member
    Posted 14 years ago #

    Thanks Andrea

    In actual fact though - what you said in your last post was what I needed to hear 10 days ago, but better yet would have been to be told what "Person" stated on the other thread -
    "If it were an .htaccess issue, then the original URL should still work while the rewritten URL won't. In your case, neither appear to work, and it looks like your setup is blocking the readfile() PHP function. You should ask your server administrator about it. "

    Support at my hosts at top class, and as soon as I quoted that at them, the support guy fixed the issue in seconds - you can see on the Hello World post that all paths to the images now work. (I also took the opportunity to nudge them that GD needs to be v2+ but they didn't acknowledge if it was or not, only that GD was already installed and active.

    What would solve a lot of these threads (prevent them even) is if Person's quote above (modified) was included in the readme file (it's not - I just checked) in the PHP section, along with a note about the GD Lib version required.

    Should I raise a documentation ticket on Trac do you think?

    Thanks to all who have persevered with my tantrums - hopefully this is the last blocker and I can now move forward with the site development.

    Gaz

  11. gazouteast
    Member
    Posted 14 years ago #

    Just popping back to confirm this also appears to have been the cause of avatar uploads and cropping not working in BuddyPress - it's now working there for me.

    Gaz

  12. andrea_r
    Moderator
    Posted 14 years ago #

    "Should I raise a documentation ticket on Trac do you think?"

    You could try.

    Glad you got it all working.

About this Topic

  • Started 14 years ago by gazouteast
  • Latest reply from andrea_r