Forum Replies Created

Viewing 3 replies - 31 through 33 (of 33 total)
  • Thread Starter sarett

    (@sarett)

    UPDATE!

    I made some more investigations and i tried calling directly the ms-files.php from browser (like: https://www.site.com/blogs/wp-includes/ms-files.php) to see if it was accessible (i did already put file permissions to 755).

    I also modified it to echo informations to the page as follows:

    $file = rtrim( BLOGUPLOADDIR, '/' ) . '/' . str_replace( '..', '', $_GET[ 'file' ] );
    echo($wpdb->blogid);
    echo('</br>');
    echo(BLOGUPLOADDIR);
    echo('</br>');
    echo($_GET[ 'file' ]);
    echo('</br>');
    echo($file);
    echo('</br>');
    if ( !is_file( $file ) ) {
    	status_header( 404 );
    	die( '404 — File not found. xxx' );
    }

    and it echoes me the following informations:

    1
    /var/www/vhosts/site.com/httpdocs/blogs/wp-content/blogs.dir/1/files/

    /var/www/vhosts/site.com/httpdocs/blogs/wp-content/blogs.dir/1/files/
    404 — File not found. xxx

    so i understand the following:
    1) the blog #id used to compose the image path is 1, while my image resides in the blog id #2.
    2) i don’t know if it’s because i’m calling ms-files.php directly and thus completely outside blog context (from where i suppose it may get the right blog #id)
    3) but i can also see it is somewhat working, so at this point i think my htaccess doesn’t have problems and ms-files.php neither.

    So why do i continue getting 404 errors on uploaded images when reading secondary blogs?

    Hello, I have the exact same problems, I can send mail but I did not forward the attachment.
    I turned off all plugins. I enabled the default template.
    But it did not work the same.
    My PHP version is 5.1.6
    Can you help me?
    Thanks

Viewing 3 replies - 31 through 33 (of 33 total)