S2member-pro breaking website with PHP 8

Has this issue been fixed yet? I just had the same problem when my provider updated to PHP8. I first installed S2Member Pro in November, so I don’t have any older files on the server. I had to comment out that same Line 137 to get my site to load.

Thanks
Rick Waller

No it hasn’t been fixed yet. There has been an update since I posted that fix but it wasn’t included - I really wonder why. No one needs that line!

A critical point for me as well. Is s2member still actively developed and maintained at all? I had the impression that things were looking up again after the upheaval. Now, however, down again for several months.

Is there any doubt that it can be relied on in the future? There will come the point, where we need a PHP 8 solution.

1 Like

Latest update and it is still broken on PHP 8

Yes - here again what to delete for everyone:

  	'pro_clickbank_username'                  => '', 'pro_clickbank_clerk_key' => '', 'pro_clickbank_developer_key' => '', 'pro_clickbank_secret_key' => '', 'pro_clickbank_return_template_header' => sprintf(_x('<div><small style="font-size:70%;">ClickBank is the retailer of products on this site. CLICKBANK® is a registered trademark of Click Sales, Inc., a Delaware corporation located at 917 S. Lusk Street, Suite 200, Boise Idaho, 83706, USA and used by permission. ClickBank\'s role as retailer does not constitute an endorsement, approval or review of these products or any claim, statement or opinion used in promotion of these products.</small></div><p>%1$s <strong><em>says&hellip;</em></strong></p>', 's2member-front', 's2member'), esc_html($_SERVER['HTTP_HOST'])),

I just upgraded to PHP8 and this error still exists and still breaks the site. The crazy thing is, it’s caused by one line that includes some totally unnecessary inline CSS: style=“font-size:70%;”

All that needs to be done is for the developer to remove the inline style. Bingo, now your plugin works with PHP8!

Again, the line of code is here: /plugins/s2member-pro/src/includes/syscon.inc.php on line 137

Looks like my comment was too hasty. While my initial fixed resolved the site immediately crashing, I found another fatal error on my Stripe checkout page. So I guess we all need to continue to wait for the developer to make S2 fully compatible with PHP8. Here is the new error:
PHP Fatal error: Uncaught Error: Undefined constant “s2member_pro_stripe_checkout” in /wp-content/plugins/s2member/src/includes/classes/utilities.inc.php(49)

This error does not appear on PHP7.4

Just jumping on to say I just experienced this too. Used a VPS install script that set up PHP8. Manually downgraded to 7.4 and no errors. 7.4’s security support runs out in November so hoping this is fixed soon.

For me stripe Pro Form works fine on PHP 8.1

I was using Stripe Pro forms, but on 8.0 because that what was on the VPS install stack I was using. I’ll try 8.1 to see if it’s resolved there, but I can’t promise when :slight_smile:

I also used 8.0 without problems. Plan to update to 8.2 soon

well great the latest version finally fixed it. Didn’t look into the fix but guess it’s just the line removed.

1 Like

@openmtbmap I’ve upgraded, but haven’t tried it yet. Wondering if there’s still a concern with object caching before I try to upgrade my server stack for s2 again.

Object caching always caused me plenty of problems. Not worth bothering with it.

1 Like

I just noticed I had not posted here after adding the fix to the release months ago… I’m adding this reply so that someone that finds this thread through a search, knows that this has been solved since v220421.

:slight_smile:

Found it. Looks like the diff didn’t address object caching?

Hi Ric,

No, object caching isn’t addressed there.

Jason has since the beginning found that object caching was a source of problems, but I didn’t ask him specifics. When you tried it, what trouble did you experience?

:slight_smile:

I never tried it based on Jason’s recommendation and others here.

However, that’s a pretty old recommendation and Woocommerce + their membership plugin + Sensei seem to have solved the issue so I was wondering if there could be progress here. I did just go check other membership plugins and it seems that many are still not supporting object caching so maybe it’s just some magic by Automattic that no one else has attempted yet.

1 Like

IDK what Jason is doing now (I don’t stalk him) but I know in the past he left to go to Automattic with Rhamm Dev(sp) Since then there have been lots of advancements from Automattic in the caching arena. I’d wonder what his current thoughts are.

1 Like