latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Urgent S2M kills WP repeatedly via HTACCESS

Home Forums Community Forum Urgent S2M kills WP repeatedly via HTACCESS

This topic contains 10 replies, has 3 voices. Last updated by  Cristián Lávaque 3 years, 10 months ago.

Topic Author Topic
Posted: Friday Mar 8th, 2013 at 7:07 am #44061

I have an urgent problem, that forced me to deactivate S2Members.

Without any change in the WordPress Installation – at least none I am aware off – my domain http://www.mr-market.de startet today at about 10:00 MEZ to generate 500 Internal Server Errors.

I today neither updated any plugin nor did I change the S2Members Configuration, at least I am not aware of such a change. I am on the latest version.

Browsing through the Web I was able to nail the problem down to the HTACCESS File and to S2Members. I checked that the authorization of the file is 666.

Changing the HTACCESS via FTP to a version 7 day ago, always fixes the problem. But with a random intervall of minutes to hours, S2Members seems to destroy the file again.

This is, what my HTACCESS looked the last time, before I was forced to restore it again:

———–

# BEGIN WordPress

RewriteEngine On
RewriteBase /
R RewriteBase /
RewriteCond %{QUERY_STRING} (^|?|&)s2member_file_download=.+ [OR]
RewriteCond %{QUERY_STRING} (^|?|&)no-gzip=1
RewriteRule .* – [E=no-gzip:1]

# END s2Member GZIP exclusions

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
—————

I am no Webprogramming Pro, just an experienced user, so please explain what I need to do to get up an running with S2Members again.

Thanks in advance,
Michael

List Of Topic Replies

Viewing 10 replies - 1 through 10 (of 10 total)
Author Replies
Author Replies
Posted: Friday Mar 8th, 2013 at 7:47 am #44068

Just to add some information, this is the HTACCESS working, that I am copying to my installation:

———————-
# BEGIN s2Member GZIP exclusions

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* – [E=no-gzip:1]

# END s2Member GZIP exclusions

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
———————

What is made out of it, you can see above.

Please respond, this is an urgent call, as my site is unprotected now with S2Members deactivated.

Thanks !

Posted: Friday Mar 8th, 2013 at 8:52 am #44081

Another Update. Besides, I am wondering why there is no reaction from support, as others calls are answered ?

Do I something wrong ? Why the silence ?

I now had another lockdown with a screwed HTACCESS after I deactivated S2Members. So the cause might come from “somewhere” and just interact with the code from S2M in HTACCESS.

After this next 500 Internal Server Error Lockdown, the HTACCESS looked as follows and different from above:

————-

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
:1]

# END s2Member GZIP exclusions

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress
——————

The Part in the midth is obviously wrong. But where does it come from ?

Again – I definitly did NOT add any Plugin oder Update any Plugin today.
Wordpress, as well as S2M and any other plugin are in actual levels.

I am lost and need urgent help !

Thanks

Posted: Sunday Mar 10th, 2013 at 9:12 pm #44231
Eduan
Username: Eduan
Moderator

Hello Michael,

This issue is not caused by s2Member, it’s caused by something else, maybe external.

Could you try changing the file permissions to 754 instead of 666. Of course you then fix the file and see if the problem happens again.

If it doesn’t happen again it means that the problem was caused by those permissions. :)

– Eduan

Posted: Monday Mar 11th, 2013 at 3:40 am #44242

Well Eduan, thanks for the response – at least there is one after 2 days.

But just claiming such behaviour has no relation to S2Members, without further analysis seems somewhat “bold” to me, to say the least. Especially as S2M had similar problems in the past, just browse thorugh your own forum on “htaccess”.

And it is a bit disapointing. I have every understanding, that the S2Members Team cannot allow to be drawn into all these interoperability problems between different plugins. But on the other hand, software problems are typically not just black and white, and it is a distinct possibility, that something from S2M has unwanted sideeffects. So at least I would have expected from S2M, to take a look at some logs or whatever you use to debug.

It is especially disappointing, as I activated my Membership and payed for S2M for the only reason to receive support. I have no real need for S2M Pro. And what I got up to now, does not justify the term “support” in my perception.

Concerning the ongoing Problem:

I have my htaccess now on 444 Readonly, as this seems to be the only way, I can protect my htaccess from being overwritten in an irregular Fashion. With 644 or higher, my blog runs into 500 internals Server error within hours.

Since my first call here two days ago, I am through with almost anything. I have gone through all the wordpress documentation regarding htaccess. I know all the common problems around htaccess. I have talked to my Server Provider about PHP Space and other distinct possibilities.

Furthermore I have deactivated any WP Plugin including S2Members, and the problem persist. Temporary I thought I had found the cause, as my plugin : “Better WP Security” had similar problems reported in the past (as S2M), but even after I completly wiped WP Security from my Installation, the problem persisted.

So I am still in the dark. And I have a conspicuous timely dependency on S2M. My blog has run for 15 month without any problems of such kind. And it has run with all the plugins I currently use. Just one week ago, I activated S2M. And S2M is definitly the last plugin I added. And S2M had similar problems with htaccess reported in past.

And exactly a few days after I activate S2M the problems begin to shop up. This is a curious coincidence. Possible ? Yes ! Probable ? No !

My feeling is, there is a sideeffect of S2M, something is written somewhere, where it shouldnt be written. And it is outside the plugin Directory, as the Problem persists with S2M deactivated.

So again, I dont expect wonders and I understand your need to protect yourself for being made responsible for every WP Problem in the world. But I would expect some more commitment to really verify, that S2M is unrelated to the Problem.

And I still need real help !

Posted: Monday Mar 11th, 2013 at 11:56 pm #44314
Eduan
Username: Eduan
Moderator

I understand Michael, I will contact Jason regarding this problem, perhaps he has a better handle on what could cause the problem.

I’m not sure how much it’ll take him to answer.

In the mean while, have you contacted your server provider’s regarding this? I mean, have you had your server provider’s look into what’s been modifying this file every time? I think something like that should be possible for server providers.

– Eduan

Posted: Tuesday Mar 12th, 2013 at 1:20 am #44320

Hi Michael.

Sorry I didn’t see your support thread sooner, it’s been a busy week here and I’ve been a bit behind with the threads.

Regarding your .htaccess code, this is what I have in my installation:

[hilite pre_code]
# BEGIN s2Member GZIP exclusions

RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]

# END s2Member GZIP exclusions
[/hilite]

I see in yours that the enclosing if tags are missing, but that may have happened when you posted without wrapping it with code tags. I also see the [hilite code]R RewriteBase /[/hilite] line in the first post, or the duplicate WP code and orphan s2 lines in your third post.

I understand that this started happening around the time you installed s2Member, but I don’t think s2Member is the responsible for it. If that were the case, we’d have reports of this from several site owners, and although there have been .htaccess related issues in the past, they were different.

s2Member would only modify the .htaccess on activation, so having it happen in other moments also shows that it’s something else, maybe a cron job. And the fact that the problem continues without s2Member also confirms that it’s something else.

Got it that you removed all plugins, did you also try changing the theme to the default one? Or did you check to make sure no plugin put something in your must-use plugins directory /wp-content/mu-plugins/?

You can try installing a clean copy of WordPress in a test directory and add just s2Member there, see if you can reproduce the issue.

I’m afraid that 444 works fine as long as no plugin you install/update needs to add/modify its rules, so it’s not really a solution, but at least it helps keep the site going in the meantime.

Can your webhost help looking in their logs to see what’s modifying the .htaccess file when it happens? That’d be hugely helpful to know what’s doing it.

Posted: Tuesday Mar 12th, 2013 at 3:25 am #44337

Thanks for the responses. They are much appreciated !

My Server provider is already looking into the logs as I can precisely determine the exact minute when the last “overwrite” happend. I expect feedback today.

And I will work on your suggestions, and come back later in the day with feedback.

For now thanks for taking care of my problem.

Posted: Tuesday Mar 12th, 2013 at 4:25 am #44340

No problem.

I hope their logs help pinpoint the source of your trouble so it can be solved.

I look forward to your update. :)

Posted: Tuesday Mar 12th, 2013 at 11:35 am #44381

Cristian,

(1) I am still waiting on Feedback from my Server Provider

(2) This is, what is part of my working htaccess:

——————

# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteBase /
	RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
	RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
	RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions

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

# END WordPress

——————

(3) Above is EXACTLY what S2Members tells me under “S2Member->Download Option->Preventing GZIP Conflicts on Server” to be put into .htaccess. So I guess thats Ok. Right ?

(4) I also dont believe that it is S2M alone causing the Problem, as the Problem persisted altough I had S2M deactivated für some time. But there is still the possibility of a bad side effect in combination with something else.

(5) No I did not Change the Theme (Thesis 1.8.5) as this is a production System. There are more than thousand Readers on the blog including Advertisment …. I understand that there might come a time, where I am forced to install a parallel test System, but I try to prevent this effort as Long as possible.

(6) Furthermore I have no “mu-plugin” Directory below wp-content on the server. What would be the purpose ?

Every further idea is highly appreciated. Independend of that, I come back to you after my server provider came back with an analysis of the logs. I guess this will be tomorrow. Until then, I stay on 444 as a quick fix.

Thanks, Michael

Posted: Tuesday Mar 12th, 2013 at 12:16 pm #44394

If you don’t have a mu-plugins folder under wp-content, then you don’t have must-use plugins and that’s not where the problem is.

I can understand you’d prefer to avoid creating a new installation for tests.

Yes, the htaccess code you show me there looks correct.

Okay, let’s see what your webhost says.

Viewing 10 replies - 1 through 10 (of 10 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.