Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




500 Server Error

UserPost

10:00 pm
September 14, 2010


equip4service

Member

posts 8

1

Something in Role Scoper 1.2.7 is rewriting my .htaccess file in the root of my site with errant code that is causing my site to go down with a 500 Server Error. I (and tech support) have been able to locate and rewrite the errant code to get my site back up; however, we were able to trace the code back to the Role Scoper Plugin.

I use WP 3.0.1

thanks! Appreciate your work on this!

Scott

12:01 am
September 15, 2010


Kevin

Admin

posts 2503

2

Can you paste in the pertinent excerpt of the bad .htaccess file here, or send it by contact form? Without that, I will be hard pressed to identify the cause.

Is that a multisite installation?

8:35 am
September 15, 2010


equip4service

Member

posts 8

3

It is a single site installation (not WPMU, just WP).

Here is the code:

the first time, Role Scoper inserted the following into my .htaccess file

WordPress

This should have been #WordPress Begin

the second time, it inserted this: T_FILENAME} !-d

instead of this: RewriteCond %{REQUEST_FILENAME} !-d

hope this helps!

Scott

8:49 am
September 15, 2010


Kevin

Admin

posts 2503

4

So the file contents were trimmed to start with

T_FILENAME} !-d

?

9:52 am
September 15, 2010


Kevin

Admin

posts 2503

5

Can you try updating wp-content/plugins/role-scoper/rewrite-rules_rs.php as follows and let me know if it clears your error?

change:

add_action( 'shutdown', create_function( '', 'global $wp_rewrite; if ( ! empty($wp_rewrite) ) { $wp_rewrite->flush_rules(true); }' ) );

to:

add_action( 'shutdown', create_function( '', 'global $wp_rewrite; if ( ! did_action("delete_option_rewrite_rules") && ! empty($wp_rewrite) ) { $wp_rewrite->flush_rules(true); }' ), 999 );

10:10 am
September 15, 2010


Kevin

Admin

posts 2503

6

I just revised the code modification above. Please update your file again if you have already applied the change.

10:34 am
September 15, 2010


equip4service

Member

posts 8

7

I will apply the code to my site.

To answer the above question… only 1 line in the code was appended incorrectly by RoleScoper in the above examples. The other lines of code were correct. The one line of incorrect code broke the whole site though.

thanks so much!

in Jesus,

Scott

10:39 am
September 15, 2010


equip4service

Member

posts 8

8

I did apply the code; however, I'm unsure as how to test it :)

thanks! My site is http://www.p4x.org/

Scott

10:43 am
September 15, 2010


Kevin

Admin

posts 2503

9

I just wanted to make sure you have the code revision that includes the ", 999″ argument.

Operations that may have triggered .htaccess file rewrite (and corruption) include updating a page, updating permalink settings, updating options and activating plugins.

10:46 am
September 15, 2010


equip4service

Member

posts 8

10

I did get the updated code inserted. thanks so much!

Scott


About the Agapetry forum

Currently Online:

19 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1245

Posts: 5653

Members:

There are 1255 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin