WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Wp 3.1 MultiSite "Warning: realpath()" Problem (7 posts)

  1. Mimergt
    Member
    Posted 3 years ago #

    I hello
    Before writing this post I looked on Google and in the wordpress.org forums and special sites and not gotten any answer that work for me.

    The Problem:
    Well, the main problem is simple, my Uploads not work in "non main site" for example... in http://www.mysite.com/om/ when i upload any file (like images) I recive the error below, so... in the main site and network (www.mysite.com/) all work fine...

    The Error :(
    Warning: realpath() [function.realpath]: Unable to access /var/www/vhosts/munipachalum.net/httpdocs/wp-admin/wp-content/uploads/2011/om/ in /var/www/vhosts/munipachalum.net/httpdocs/wp-includes/functions.php on line 2081

    I did everything like...

    • create a new blogs.dir directory and fix the permisions to 777 to the subfolders to
    • I re check the .htacces file (see the my oter includes)
    • also i check the config.php file
    • I try change the values in my Data Base tables for the especific site (wp_2_options > fileupload_url and upload_path)
    • In the Network site I edit the site info and change the values for the uploads path
    • read and read forums and sites and some friends
    • yes... of course, I been download a new copy of wp adn reinstalled (again)

    Sooo... i do maybe any oter things but... nothing work or made some changes in the main site ( for now works fine) and this destroy the functionality

    The truth It was I don't really know where is the problem...

    Some More Info
    I have soooo sooo much files in the actual wp-content/uploads/ folder and many more entries and pages in the main blog

    This is the content of my wp-config.php

    define('WP_DEBUG', false);
    
    define('WP_ALLOW_MULTISITE', true);
    
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'munipachalum.net' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    And this is the code of 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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    Please so sorry for my bad English, I speak Spanish

    I realy need resolve that, this is my frist profesional project with multi-site's

    sooo Tnks a lot :)

  2. Tim Moore
    Moderator
    Posted 3 years ago #

    Check the permissions on /wp-content/uploads, first.

    Second, it looks like it is trying to access /wp-admin/wp-content/uploads. Somethings is wrong there. Not sure if this is something you changed or not, but there is no /wp-admin/wp-content/ directory by default.

  3. Mimergt
    Member
    Posted 3 years ago #

    @Tim

    My Wp-content/uploads is 777 for this folder and any oter files an folders inside

    I know that this path is wrong but I don't know how or where fix it

    Tnks for answer

  4. Tim Moore
    Moderator
    Posted 3 years ago #

    Have you disabled all plugins and tried again?

  5. Mimergt
    Member
    Posted 3 years ago #

    Yes...

    and not work :(

    I've done many things suggested on many sites and blogs...

    Please help

  6. Tim Moore
    Moderator
    Posted 3 years ago #

    Try changing the upload_path variable to the entire path (from the very root of the server). So it would be something like /var/www/vhosts/munipachalum.net/httpdocs/wp-content/uploads

  7. Mimergt
    Member
    Posted 3 years ago #

    Win!!! That's Woks!!!

    You Save me... tnku so much!! :)

Topic Closed

This topic has been closed to new replies.

About this Topic