Resources

My Agape try

Your Agape try


RS problems on some WP-mu installations

Some WordPress mu administrators have reported severe errors after updating to Role Scoper 1.1.

These appear to be caused by Role Scoper's revised file filtering mechanism, which inserts custom .htaccess directives.  Although designed and tested specifically for WP-mu, these changes have crashed at least two sites.  Since the cause and prevelance of this error is not yet known, I have published Role Scoper 1.1.2, which disables File Filtering by default for new installations, and turns it off for existing WP-mu installations.

If you are already hit by this error, recover by restoring the contents of your .htacess file to .htaccess-dist. Next, turn off File Filtering ( Site Admin > Role Options > File Filtering), or by adding the following line to wp-config.php:

define('DISABLE_ATTACHMENT_FILTERING', true);

By doing so, you will disable Role Scoper's file attachment filtering feature.

I expect to correct this error once I get some detailed feedback on the WP-mu error condition.  Until then, feel free to turn the feature back on manually and correspond with me on the details of any errors that arise.

Comments

Pingback from RS problems on some WP-mu installations | Agapetry WP Air
Time: December 31, 2009, 12:12 pm

[...] See original here: RS problems on some WP-mu installations | Agapetry [...]

Comment from Steven
Time: January 6, 2010, 2:54 pm

Hello Kevin. I love this plugin and have used it on many sites I develop. I also had a similar issue with RS and .htaccess. I think you could resolve most of your issues if you simple append your directives to the existing .htaccess instead of overwriting the existing version. I had some sites hosting on 1and1, which requires a PHP5 directive, but RS would overwrite this, causing my site to go down. After I figured that out, I had to enable the plugin, then make .htaccess changes, then finally make the .htaccess read only!

Just a thought for possible improvement.

Comment from Kevin
Time: January 6, 2010, 3:03 pm

Steven,

Normally I would just let the rules be appended, but that won't work with mu because the default WP redirect to blogs.php takes effect before I have a chance to do any redirect / filtering of image requests.

Can you forward me a copy of an .htaccess that takes a site down? I've had a couple people report this, but I've yet to see a copy of the actual generated rules.

Comment from Kevin
Time: January 6, 2010, 3:27 pm

Thanks for mentioning the php5 directive; that may be a useful clue. I don't see why it would be overwritten, though. The RS code imposes an insertion (not overwrite) into the existing .htaccess, just above the default file attachment redirect.

Comment from Alfred
Time: January 19, 2010, 3:59 am

Nice work!

Comment from Bjørge
Time: January 20, 2010, 5:47 am

Hi, does it help you fix the problem that this is my apache error: PHP Fatal error: Call to undefined function get_home_path() in /var/www/wpmu_C/wp-admin/includes/misc.php on line 152, referer: https://c.uib.no/wp-admin/wpmu-upgrade-site.php

After that the wp-admin site goes blank (no output).

My .htaccess looks like this: RewriteEngine On RewriteBase /

#uploaded files RewriteRule ^(.*/)?files/$ index.php [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L]

SecFilterEngine Off SecFilterScanPOST Off

Comment from Bjørge
Time: January 20, 2010, 5:50 am

With line breaks:

RewriteEngine On

RewriteBase /

#uploaded files

RewriteRule ^(.*/)?files/$ index.php [L]

RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

# add a trailing slash to /wp-admin

RewriteCond %{REQUEST_URI} ^.*/wp-admin$

RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule . - [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]

RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]

RewriteRule . index.php [L]

SecFilterEngine Off

SecFilterScanPOST Off

Comment from Matthew
Time: January 29, 2010, 11:55 pm

Same problem, except mine occurs when accessing [site root]/wp-admin/

Comment from Kevin
Time: February 5, 2010, 6:32 pm

The get_home_path() error and a few similar symptoms are fixed in Role Scoper 1.1.5

Write a comment

(But if your comment is a usage question, bug report or feature request, please post it in the Support Forum instead.)