• 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 - 31 through 45 (of 58 total)
  • In addition to checking ownership as Ipstenu suggested, You are saying that /wp-content/blogs.dir/blog#/files/2011/02/image is not working, but that /wp-content/blogs.dir/blog#/files/2011/image is … Does your 02 folder have sufficient (755) permissions?

    I know you said you checked permissions, I was just wondering if you checked it on each of the folders in the path along the way to where the image is stored at.

    Also try manually FTPing another image to that same folder, then manually browsing to that image and see if it comes up.

    [Edit: Oops… I was two minutes late in typing my response

    Try the image thing though. I am thinking that there may be a problem with your image itself. Trying to view the image shows me what I might expect if the file format was incorrect, or if it was uploaded in ASCII instead of Binary]

    ?? other images – the same situation. Try https://nie-opozniaj-piesni.net/sluzew/files/2011/02/butelka.gif and https://nie-opozniaj-piesni.net/sluzew/files/2011/02/butelka.gif

    no matter I upload them via ftp, wp or other www-filemanager

    Do you have another .htaccess somewhere in any folder starting from your uppermost web root all the way down to the 02 folder? It could be a .htaccess setting. Also, did you check the GID/UID?

    Do you have another .htaccess somewhere in any folder starting from your uppermost web root all the way down to the 02 folder?

    No, I don’t

    Also, did you check the GID/UID?

    Yes, its ok.

    But why and what changes with image file saving via two links (via wp link and real)? What causes this?
    Isn’t it so that domain/blog/files/image is opening with use of ms-files.php? I don’t know php, could You tell me what does this file do?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The two URLs is to mask the blogs.dir location.

    domain.com/files/2011/02/file.jpg points to ms-files.php which translates that as domain.com/wp-content/blogs.dir/1/files/2011/02/file.jpg

    It’s supposed to do this. The problem is your ms-files.php isn’t doing the translation right.

    the same situation is with other files eg. zip files – downloading via domain/blog/files/2011/02/file are corrupted.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I’m kind of leaning towards ‘Something on your server is seriously messed up, sir.’ I’ve never seen this one before.

    You’ve done the whole ‘Turn off all plugins, revert to the default theme’ and it still dies?

    That ms-files.php file is either seriously wrong (a reinstall of WP’s core files would have fixed that), or the version of PHP on your server is messed up, or your server doesn’t handle MIME types as well as it should.

    the same situation is with all blogs, except main. If You want to, try this two links https://nie-opozniaj-piesni.net/sluzew/files/2011/02/butelka.zip
    and
    https://nie-opozniaj-piesni.net/wp-content/blogs.dir/5/files/2011/02/butelka.zip

    All other links, files, images are ok, only wp links to media directories.

    You’ve done the whole ‘Turn off all plugins, revert to the default theme’ and it still dies?

    Yes

    That ms-files.php file is either seriously wrong (a reinstall of WP’s core files would have fixed that), or the version of PHP on your server is messed up, or your server doesn’t handle MIME types as well as it should.

    Reinstall WP didn’t help.
    PHP or MIME – maybe yes, something is wrong, but only together with ms-files, cause all other stuff from this server is working fine.

    I consider to move files from blogs.dir to uploads or something, inversely to Yours: https://code.ipstenu.org/2010/moving-your-images-for-multisite/
    or some htaccess rules for every sub-page…

    Ipstenu wrote: The two URLs is to mask the blogs.dir location.

    domain.com/files/2011/02/file.jpg points to ms-files.php which translates that as domain.com/wp-content/blogs.dir/1/files/2011/02/file.jpg

    It’s supposed to do this. The problem is your ms-files.php isn’t doing the translation right.

    Do You think it is possible that ms-files.php translate URLs right but files from media library are wrong translated? With or without participation of php on my host…

    Have someone of You tried to download one of this files from my links and opened it?

    part of ms-files.php. Does it refer to php on server or something inside wp?

    $mime = wp_check_filetype( $file );
    if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
    	$mime[ 'type' ] = mime_content_type( $file );
    
    if( $mime[ 'type' ] )
    	$mimetype = $mime[ 'type' ];
    else
    	$mimetype = 'image/' . substr( $file, strrpos( $file, '.' ) + 1 );
    
    header( 'Content-type: ' . $mimetype ); // always send this
    if ( false === strpos( $_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS' ) )
    	header( 'Content-Length: ' . filesize( $file ) );
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You can’t do the inverse of my ‘how to move your images’, really, because each separate blog needs it’s own folder (or you will be in a world of hurt). You MIGHT be able to define each to it’s own though.

    The ms-files.php is NAMED php so yes, it calls PHP on your server ?? That’s how it works.

    Have you checked the file permissions of your other files (such as ms-files.php, etc.) to make sure they are all readable by the appropriate sources? Is it possible that your Web server is not able to read ms-files.php, and is therefore failing to use it?

    Also, have you checked your server’s error logs to make sure no clues can be found there?

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^[_0-9a-zA-Z-]+/files/(.+) wp-includes/ms-files.php?file=$1 [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).*) $ [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    See
    https://core.trac.www.ads-software.com/changeset/15949 and

    https://core.trac.www.ads-software.com/ticket/15083

    @ron Rennick
    Didn’t help, smashed everything. Thats why I think its not a htaccess problem but some php function of wp on my server.

    @curtiss Grymala
    Yes and yes ?? nothing

    @ipstenu
    Thats how makapu understands php ??

    Now I’m almost sure – problem is with some php function in wp, ms-files, function.php or some else. Files downloaded via ms-files are changed rel. to source file on server.

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