tags:

views:

183

answers:

1

I'm helping a colleague with a recurring issue that's just started happening to multiple sites of his after upgrading to the latest release of WP... He had 4 sites go down today. Here's the message he received back from the server host...

The coding that wordpress posts into the .htaccess file is basically being re-pasted in a malformed fashion. Basically we just separate these two as you can see below. Contrary to the post statement I had seen previously, there is nothing in the apache logs files indicating any changes to you site. Neither are there entries over cpanel or FTP. All methods of compromise have been exhausted. I do not believe your scripts are being compromised in any manner. This is an issue within wordpress itself. Have there been any changes to the blogs, or perhaps any changes that effected all accounts recently?

The curious part to me in the extract of contents from hit .htaccess file is this:

</IfModulden
# END Word</Limit>
AuthName siteeakers.net
AuthUserFile /home/site/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/site/public_html/_vti_pvt/service.grp

Here is the full text from the hosting provider or the before and after htaccess fix...

Before...

root@cherry [/home/site/public_html]# cat .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModulden
# END Word</Limit>
AuthName siteeakers.net
AuthUserFile /home/site/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/site/public_html/_vti_pvt/service.grp
Options All -Indexes

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

After...

root@cherry [/home/site/public_html]# cat .htaccess
AuthName siteeakers.net
AuthUserFile /home/site/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/site/public_html/_vti_pvt/service.grp
Options All -Indexes

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
A: 

This

</IfModulden
# END Word</Limit>

is definitely a replace operation gone wrong. It should probably read

</IfModule>
# END WordPress

Update: I think I found some related bugs:

the latter was closed as a duplicate of the former. From what I can see, the function Wordpress uses to write the .htaccess files can crash on a busy server.

11903 seems to have a patch. If this is your problem, maybe try it out.

Things like this are why you should never, ever try to update a live system. Have a local or parallel copy to try things out with; Then do a simple directory rename to replace the running versions.

Pekka
Thanks Pekka, I will check these out. Do you think its in any way related to this > http://www.codedifferent.com/2009/01/12/solution-for-500-internal-server-error-after-upgrading-to-wordpress-27-at-1and1-server/
Scott B
@Scott hardly. This seems to be an issue of multiple instances of Wordpress concurrently trying to write into the htaccess file.
Pekka
@Pekka, its not clear to me in the docs (perhaps it should be) was this issue created with 2.9.2 or did it exist previous?
Scott B
@Scott according to the bug tracker, it was discovered in, and entered for, 2.9. It could well be that it existed before that, though. Actually, I wouldn't be surprised if it did.
Pekka
@Scott did this fix it?
Pekka
Pekka, I'm working with the client now to install the patch. However, when I downloaded it, misc-with-patch.php, Its not clear how to install, and opening it in edit mode is no real help. Any clues?I'm presuming the file is meant to overwrite an existing file in the target site. Which one?Also, should I suggest clients to refrain from upgrading to 2.9 through 2.9.2? How would I find out if the fix will be in 2.9.3 and is there a convenient way to uninstall 2.9.2 and go back to 2.8? To many ?s I'm sorry :)
Scott B
This should show what needs to go where: http://core.trac.wordpress.org/attachment/ticket/11903/11903-by-strings28.diff it all takes place in `/wp-admin/includes/misc.php`
Pekka
@Scott see my previous comment as for where to put the patch. Question 2. I don't know, as I don't know in which version the bug "started"; 3. By keeping track of the bug tracker for any status changes in #11903 (I presume you can subscribe to updates); 4. I don't know, you'd have to search the wordpress codex for info on downgrading. I guess, however, that it's possible.
Pekka