PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Issue with Membership Options Page for logged users

s2Member Plugin. A Membership plugin for WordPress®.

Issue with Membership Options Page for logged users

Postby CyberOto » November 17th, 2011, 6:08 am

Hi,

I have setup S2Member and have 2 protected pages - one that require level 0 and one with level 1.

When non logged user is trying to access both of them, he is properly redirected to the page set in Membership Options Page.

When user with level 0 is trying to access the page for level 1, he is redirected to the Membership Options Page, but the page is blank. I can see the GET parameters and all, but no content. No HTML code returned.

If I use this URL with all parameters in other browser (not logged in) I got the page shown.

Do I miss something in configuration of S2Member?

Any advice is appreciated.


Regards,

P.S.
Used the search, but I have not found similar topic :roll:

EDIT:

Aw ... found the problem:

In case of user level 0 trying to access level 1 page I got 414 Request-URI Too Long return code :o

What can I do for that ?
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011

Re: Issue with Membership Options Page for logged users

Postby Eduan » November 17th, 2011, 8:11 am

Try going to WP Admin -> s2Member -> General Options -> URL Shortening Service Preference and check every thing there.

Hope this helps. :)
Also remember to report back,
otherwise you leave me worrying. ;)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Issue with Membership Options Page for logged users

Postby CyberOto » November 17th, 2011, 8:36 am

Hi Eduan,

Just checked there - I have selected goo.gl for shortening. As far as I get it this is used only for links in e-mails ?

For some reason if the parameters are above 230 bytes i got this error. Here are the GET parameters that are generating 414 Error Code:

Code: Select all
?_s2member_seeking[type]=page&_s2member_seeking[page]=519&_s2member_seeking[_uri]=L253YS1idWxnYXJpYS9tZW1iZXJzLw%3D%3D&_s2member_req[type]=level&_s2member_req[level]=1&_s2member_res[type]=page&s2member_seeking=page-519&s2member_level_req=1


If I manually shorten them below 230 bytes - all is working. For example:
Code: Select all
?_s2member_seeking[type]=page&_s2member_seeking[page]=519&_s2member_seeking[_uri]=L253YS1idWxnYXJpYS9tZW1iZXJzLw%3D%3D&_s2member_req[type]=level&_s2member_req[level]=1&_s2member_res[type]=page&s2member_seeking=page-519

is working and the page is loading.

I have removed the last parameter
Code: Select all
&s2member_level_req=1


Going to dig-in into ws_plugin__s2member_url_shorten to see if this could help.


Regards,

P.S.
Contacted the hosting support and they claim that Apache LimitRequestLine is set to 8K, but still have this error.
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011

Re: Issue with Membership Options Page for logged users

Postby CyberOto » November 17th, 2011, 9:46 am

Found some odd issue.

If I'm logged as administrator I can load with no issue the long URL that is generating 414 error code for level 0 - 4 members. Logged out completely, and the same long URL is also loading the page contents.

:?

Any way to strip some of the parameters that are passed via GET. A way that do not involve hacking in the code directly that is :mrgreen:

I'm wondering about stripping one variable _s2member_req[level] or s2member_level_req that contain one and the same info. This is for illustration only.


Regards,
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011

Re: Issue with Membership Options Page for logged users

Postby CyberOto » November 18th, 2011, 2:49 am

Anyone ?

I'll appreciate any suggestion.


P.S.
a.k.a. shameless bump :roll:
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011

Re: Issue with Membership Options Page for logged users

Postby Cristián Lávaque » November 21st, 2011, 2:35 am

Thanks for reporting this important issue! I'm notifying Jason so he can look into it and solve it. :)
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Issue with Membership Options Page for logged users

Postby Jason Caldwell » November 21st, 2011, 3:16 pm

Thanks for the heads up on this thread.

414 Request-URI Too Long

By default, web servers and browsers set fairly generous limits on the length for URLs. Up to 2048 or 4096 characters. I'm not aware of any browser with a limit under 2048 bytes, and none of s2Member's URLs exceed that, even in their full format before having been shortened, in some specific cases ( mostly to prevent issues with email clients ).

If you are receiving this error, here are some things I'd have a look at.

1. Do you have any plugins installed into WordPress, which might be security-related, with a configuration that could trigger this error? If so, try disabling those plugins, or scanning back through your configuration of them a bit.

2. Do you have any security-related Apache or PHP extensions running on your server, such as Suhosin, mod_security, suPHP, which might be configured with abnormal settings, thereby causing this issue? See also: viewtopic.php?f=36&t=14787

3. Ask your hosting company again. If the issue cannot be resolved on your own, or you don't have access to your Apache and/or PHP error logs to find out what's actually happening, or what is triggering this error, a hosting company should be able to help you with this.

You mentioned this was not a problem when you are logged in as an Administrator, which makes me think it could have something to do with a plugin. So you might spend some more time on #1 above.

Please let us know what you find out.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Issue with Membership Options Page for logged users

Postby CyberOto » November 21st, 2011, 11:49 pm

Hi Jason,

It turned out that it was SecureWP plugin that is messing around. If the option to Protect WordPress against malicious URL requests is turned on, I got the 414 Error.

Checked the code and found out that this function is limiting the whole URL string to be less than 255 bytes. Once I corrected that - all started to work as intended.

Thank you for your suggestion and keep up the good work.


Regards,
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011

Re: Issue with Membership Options Page for logged users

Postby Jason Caldwell » November 21st, 2011, 11:59 pm

Thanks for reporting back on this.
~ MUCH appreciated.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Issue with Membership Options Page for logged users

Postby CyberOto » November 22nd, 2011, 3:50 am

I have added a post to SecureWP support thread on wordpress.org with a simple description and solution I used for myself:

http://wordpress.org/support/topic/secure-wordpress-and-s2members


Regards,
User avatar
CyberOto
Registered User
Registered User
 
Posts: 6
Joined: November 17, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron