• Hi to all, i hope you can help me because i’m going crazy ??

    I wanted to have a site translated into 3 languages (including flash movies and pics) so I installed WP 3.0.1 in network mode, with subfolders. So now I find a main WP installation that controll other 3 sub-sites.

    In main WP everything works perfectly, and the pics seems to work properly, and stored them in wp-content/uploads. If i load same pics by the secondary WP installations, the images are loads, but i can’t see them.

    The pictures are loads but doesn’t appear in Media preview panel, and if I recall the pics in a page or an article, I see the small image corrupt icon.

    I thought it was a problem with .htaccess file but it seems good.This is my .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    I think that this file is accurate…

    So,I thought it was a problem whit folders permissions. I check the folders and i check this path: wp-content/blogs.dir/2/files…. all theese folder have the 0777 permissions.

    Now, i don’t know if there are permalinks problems, or something else… i did other tests:
    I uploaded the pictures with the media library, via ftp and through other plugins… I installed the default plugin twentyten and I removed all plugins, to see if there was any incompatibility… but nothing… there is always the same problem…

    I hope u can help me… I do not know what to do

    Sorry for my bad english
    greetings
    Niko

Viewing 15 replies - 16 through 30 (of 58 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    bh_WP_fan That’s not actually correct.

    When you make a normal Single Site WP, the images are loaded in wp-content/uploads.

    When you turn it into MULTI site, /files/ gets used and TRANSLATED by the .htaccess to wherever your SITE OPTIONS says the files are located.

    (that would be this bit

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

    )

    For most sites it’s going to be /blogs.dir/#/files/blahblah — But your first site keeps it in /wp-content/uploads.

    Read https://code.ipstenu.org/2010/moving-your-images-for-multisite/ for more details

    @bh_wp_fan
    You’ve seen this post propably, when I was trying to do something, thats why You could get ‘file not found’ message. You can check this now https://nie-opozniaj-piesni.net/jagoda/files/2011/02/corel.jpg
    I’m getting something like ’empty image’ in different browsers.

    @ipstenu

    On my main page, directory with media is exactly this and images are loading perfectly ok. The same is with all other EXISTING directories-when I put link to image in other directory, image loads.

    Problems are with images from media (blogs.dir/#/files)

    This rule from .htaccess points to ms-files.php, am I right? So, maybe in this php there is some bug? I don’t now php, almost at all.

    No, it’s not in the php. It’s htaccess pure & simple.

    make sure that rule points to wp-INCLUDES/ms-files.php

    when I see it, it just shows the filename in the browser, which is a server issue plain & simple. we’ve gone over it a dozen times in the forums.

    Thread Starter skydivesardegna

    (@skydivesardegna)

    i solved it only configuring right permissions ??

    This is my htaccess

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    It was generated by wordpress install

    @ skydivesardegna
    how? like this way directories to 755, files to 644?

    Thread Starter skydivesardegna

    (@skydivesardegna)

    yes

    Thanks for the correction, Ipstenu. You are absolutely correct. I was aware of that but somehow spaced, halfway through writing my comment, that we were working with multi site.

    Correct me if I’m wrong, but makapu’s .htaccess looks correct to me. Maybe this one just needs some permission changes like skydivesardegna mentioned.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Yeah the .htaccess looks fine.

    https://nie-opozniaj-piesni.net/jagoda/wp-includes/ms-files.php?file=2011/02/corel.jpg is also blank which is odd. That kinda implies a PHP error (blank page of death == PHP 90% of the time).

    Try the permissions suggestion, though, for sure.

    I tried this and other chmod when I’ve read bh_WP_fan post. Nothing changes.
    Observation: opening image browser does downloads as many bytes as image size, but doesn’t show image.
    Can it be something with servers MIME types settings? I’m so stupid…

    another: I opened link https://nie-opozniaj-piesni.net/sluzew/files/2011/02/corel1.jpg saved image to disk. Trying open file I’m getting ‘invalid format or not supported’. Any suggestions?

    Sorry about my grumble.
    MIME doesn’t play a role, cause images from server are displayed properly. All images from virtual directory blog/files/… are wrong. This applies to images loaded by wp to media library and via ftp to all folders: domain/blog/files/2011/02/image domain/blog/files/2011/image, domain/blog/files/image

    but

    when I point to domain/wp-content/blogs.dir/blog#/files/2011/02/image I’m getting “Forbidden, You don’t have permission to access #file

    when I point to domain/wp-content/blogs.dir/blog#/files/2011/image,
    domain/wp-content/blogs.dir/blog#/files/image
    or domain/wp-content/blogs.dir/blog#/image

    I can see it…
    so, could it be something with .htaccess? Ipstenu, anyone?

    You can see it Yourself in my sites:
    https://nie-opozniaj-piesni.net/sluzew/files/2011/02/corel.jpg and https://nie-opozniaj-piesni.net/wp-content/blogs.dir/5/files/2011/02/corel.jpg

    https://nie-opozniaj-piesni.net/sluzew/files/2011/corel.jpg and https://nie-opozniaj-piesni.net/wp-content/blogs.dir/5/files/2011/corel.jpg

    The same is with ALL other SUB-PAGES

    when I point to domain/wp-content/blogs.dir/blog#/files/2011/02/image I’m getting “Forbidden, You don’t have permission to access #file

    now we’re getting somewhere. ??

    looks probably like the *owner* of the file is preventing it from being read. More so than the permissions on the file. Tho you could check that too.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Oooh. Check if nobody:nobody owns the file! It could be a PHP settings gaff! I did that once.

    https://nie-opozniaj-piesni.net/wp-content/blogs.dir/5/files/2011/02/corel.jpg
    set to directory to 754 and image loads! (it was 755 and I tried also others chmod)

    but still https://nie-opozniaj-piesni.net/sluzew/files/2011/02/corel.jpg don’t show image properly.

    removing htaccess cause path domain/blog/files/image not to work (‘Not found’), so in this point htaccess is working ok.

    Do You Andrea, or someone, tried to save this file: https://nie-opozniaj-piesni.net/sluzew/files/2011/02/corel.jpg
    to disk and opened it? I’m getting ‘unknown file format’ error.

    !The same file downloaded through this two links from beginning give two different files when saved to a disk. Isn’t it strange?

    If You like to see other picture, in place of this commercial (I was describing this banner on my blog) use image butelka.gif (it means bottle ??

Viewing 15 replies - 16 through 30 (of 58 total)
  • The topic ‘Media Library and pics in WPMU doesn't work’ is closed to new replies.