WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image path issues and confusion (52 posts)

  1. dixonge
    Member
    Posted 2 years ago #

    OK, maybe it was my old profile? I can't seem to post anything here without triggering spam filters and locking the thread. Maybe someone can actually reply to this one...fortunately, I found another login I used to use!
    ---------------------
    I have my main site and one add-on site up and running on multisite. Today I had a major issue come up with a third site and the host admin ended up pretty much wiping the install directory, so I decided it would be a great time to go ahead and migrate this third site into my multisite install.

    So far, after lots of SQL insanity, I seem to have managed to get the main content back up and running. But when I went to put my old original header image back up, I just hit a brick wall. Here are what I believe are the relevant image path settings as they stand right now:

    Uploads Use Yearmonth Folders = 0
    Upload Path = wp-content/blogs.dir/3/files
    Upload Url Path = site3/wp-content/blogs.dir/3/files
    Fileupload Url = site3/wp-content/blogs.dir/3/files

    When I attempt to upload a new header image, it is broken. WordPress is trying to assign it this URL: site3/files/cropped-Server+Room2.jpg

    htaccess contains the following:

    http://pastebin.com/QwzxLh7R

    Any ideas?

  2. dixonge
    Member
    Posted 2 years ago #

    also, I'm using the subdirectory version of this, not subdomain (if that helps)

  3. foto3d
    Member
    Posted 2 years ago #

    I just upgraded to 3.3 yesterday, and all images are broken (except for a few offiste ones that were directly linked to). I'm not using any image plug-in, either. Headers, article images are all broken.

  4. RAvmb
    Member
    Posted 2 years ago #

    Oh so it's not just me...as bad as it may seem it's comforting to know I'm not the only one having problems with this.

  5. Um... http://wordpress.org/support/topic/image-path-issues?replies=2 is the exact same post.

    Are these BOTH you?

  6. dixonge
    Member
    Posted 2 years ago #

    Yes. As soon as I posted my first post the thread was locked. I'm guessing from either too many links or lines of code? Also, there is a possibility that my user profile was flagged or something. After I changed the password on THIS User profile (dixonge) I was able to use it to post without getting locked down immediately....

    But - if the other one is unlocked now, I guess I'll answer over there?

  7. dixonge
    Member
    Posted 2 years ago #

    ok, so now the other thread is locked, I guess I'll continue here!

    I'm using subfolders.

    I have ended up changing ten different parameters, including the Fileupload Url, in ten different ways. None of the combinations has worked so far.

    Each time I make a change I test it by attempting to upload a new header image. So far the result is that the new image is immediately broken, because it is being uploaded to one location but all references to it are looking for it in another location. This is even true for the Media Library. All images, past and present, are broken.

    My Fileupload Url currently matches what you wrote: http://site3/files

  8. What's the location it's looking in?

    It's SUPPOSED to look in domain.com/site3/files/2011/12/image.jpg

    Yes, I know it's not there, don't worry about that. If it's looking THERE then the most likely issue is that your server isn't reading your .htaccess correctly and needs AllowOverride set to All in yout httpd.conf

  9. dixonge
    Member
    Posted 2 years ago #

    I'm not sure I understand the question. "looking in" ?

    In my first post I mentioned that WordPress is trying to assign it this URL:

    site3/files/image.jpg

    Is this what you mean?

  10. Yeah- OH!

    Uploads Use Yearmonth Folders = 0

    Why is that a 0? Make that 1.

  11. dixonge
    Member
    Posted 2 years ago #

    I was trying everything!

    ok, changed it to a 1 - it's now looking for the images in:

    site3/files/2011/12/image.jpg

    but the image is actually being uploaded to:

    site3/wp-content/blogs.dir/3/files/image.jpg

  12. Okay, lesson time :)

    It's supposed to look in site3/files/2011/12/image.jpg

    Go look at your .htaccess

    See RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    It translates that URL to site3/wp-content/blogs.dir/3/files/image.jpg ... Actually it should translate to site3/wp-content/blogs.dir/3/files/2011/12/image.jpg but with all the mucking around you did...

    What happens if you go to site3/wp-includes/ms-files.php?file=/2011/12/image.jpg

  13. dixonge
    Member
    Posted 2 years ago #

    my .htaccess does contain that line

    tried the ms-files.php URL - 404 error

  14. How about ... domain.com/wp-includes/ms-files.php?file=/2011/12/image.jpg

    Notice how I REMOVED site3 from that URL?

    I do think the problem is your httpd.conf file isn't set up right and needs AllowOverride set to All.

  15. dixonge
    Member
    Posted 2 years ago #

    nope, that didn't work either.

    You keep mentioning httpd.conf - I'm on a shared hosting account. I don't think I have access to that directly, unless it is in cPanel...

    Here is the kicker. I know where my existing image files are. How tha heck do I tell MultiSite how to find and reference them? Which settings affect that?

  16. Stop trying to 'tell' Multisite anything, that's how you got all this screwed up worse in the first place. Multisite already KNOWS what it's doing. It KNOWS that site3/files/2011/12/etc means /blogs.dir/3/files/2011/12/etc - It's very smart :) The ms-files.php file and the .htaccess are how it knows. The more you mess with that, without understand how it works, the worse off you are.

    Go tell your host that you need THEM to check their httpd.conf and see if AllowOverride is set to ALL, because you have .htaccess rules not being read.

    (Also set your blogs.dir folder, and all children folders to either permission 775 or 777 while you're at it, I've seen weirder.)

  17. dixonge
    Member
    Posted 2 years ago #

    to be honest, I only changed settings because things weren't working right to begin with! :)

    blogs.dir and children are already all at 777

    I will contact the host.

    Also, how can I reset each sites settings file back to default values?

  18. Next time trust the tool :D If a setting is well hidden (i.e. not easily found in the dashboard of the site), you can safely assume it's powerful and dangerous.

    You can't reset the settings. You CAN make a new subsite, make a note of those settings, and copy 'em over manually.

  19. dixonge
    Member
    Posted 2 years ago #

    Just found an interesting article that I probably should have read before I started this whole multisite thing...

    Don't Use WordPress MultiSite

    How's this for a reason not to use MultiSite?

    "I just want to be able to manage my plugins and updates from a central dashboard."

    I'm thinking pretty seriously about going back to individual installs...

  20. That's my website y'know ;)

    The point of it was to make people ask themselves 'Why do I WANT Multisite?' A lot of folks see it as a silver bullet, and its not. It IS useful and great for a lot of things, btu not everything.

    Without knowing what you're doing with your site, though, I can but guess if you should, or shouldn't, use Multisite.

  21. jcaynes
    Member
    Posted 2 years ago #

    Good evening. Since upgrading to WordPress 3.3, my MU has not worked with pretty permalinks and one of my subdomain blogs is not loading images, while the primary domain, parceledgardens and another blog, shop.parceledgardens.com load images wiki.parceledgardens.com does not.

    I read through the posts, checked phpmyadmin, found the relative upload link for the images to be:
    wp-content/blogs.dir/13/files.

    When adding images, they get uploaded to:

    http://wiki.parceledgardens.com/files/2011/11/happybee1.jpg

    Since having this trouble, I have uninstalled and reinstalled the wiki sub-blog, deactivated and reactivated the plugins, changed the theme to default and back again and still no image joy.

    I have checked the .htaccess file, and have this:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress

    This appears to be correct, so I am bewildered why my pretty permalinks and more importantly my image uploads are not working for only one sub-blog. BTW, image directories are 775.

    Any information is very appreciated!

    Thanks!

    Jan

  22. If it's only one blog, it's usually a plugin.

    The image upload folder and the rewrite for it is as it should be.

  23. jcaynes
    Member
    Posted 2 years ago #

    Well, I've disabled and re-enabled each of the plugins. It doesn't work w/out any plugins either. Or when changing back to the default theme. Images are there, but when added to a post the image broken icon appears.

  24. jcaynes
    Member
    Posted 2 years ago #

    Oddly, the 2011 header and images appear and work fine. Just nothing that I upload.

  25. I am bewildered why my pretty permalinks and more importantly my image uploads are not working for only one sub-blog. BTW, image directories are 775.

    I'd wonder if it has to do with how you set up the subdomain, personally. Wildcard or manual?

  26. jcaynes
    Member
    Posted 2 years ago #

    I have wildcard DNS (* A record pointing to dedicated IP) so that building subdomains "on the fly" are supported.

  27. jcaynes
    Member
    Posted 2 years ago #

    I don't understand the relationship between the DNS and image files in the hosting? Would you explain the query, please?

  28. DNS is one half of the battle.

    How did you set up the vhosts on your SERVER?

    anything.mydomain.com always points to me. But telling my server 'let WordPress handle anything.mydomain.com' is a slightly different thing. If THAT isn't set up right, things go astray.

    Did you create a subdomain in cpanel? Did you set THAT up to be wildcard?

    I'm NOT asking about DNS, so please don't tell me about CNAMEs and A records ;) They don't matter right now.

  29. jcaynes
    Member
    Posted 2 years ago #

    I don't use a c-panel, I don't have this on a server, this is on shared hosting environment. Domain DNS has been set properly, I had no issues prior to the 3.3 upgrade. DNS has remained the same the entire time.

  30. You do too have a server. That's where WP is installed. It's a SHARED server, but a server non the less :)

    How do you add subdomains to your hosting account?

Topic Closed

This topic has been closed to new replies.

About this Topic