Missing MySQL extension

I ran s2-server-scanner.php on my WP installation and the only problem reported was:

Missing MySQL extension. s2Member needs the MySQL extension for PHP. This will add MySQL support to your installation of PHP, allowing MySQL database communication. Please consult with your web hosting company about this message.```

I checked the hosting service configuration (I'm using Bluehost) and the cPanel “PHP Extensions and Applications Package” Installer shows:

```Module Name	Version
Archive_Tar	1.4.5
Console_Getopt	1.4.1
MDB2	2.4.1
MDB2_Driver_mysqli	1.4.1
PEAR	1.10.7
Structures_Graph	1.1.1
XML_Util	1.4.2```

So, what is missing?

Hi Mark.

Is your WordPress installation working properly? If so, don’t worry and ignore that message for now. s2Member uses WP’s database class. .

Why did you try the server scanner? Are you having a problem you’re trying to troubleshoot?

:slight_smile:

You wrote: Ignore the warning! For the love of all that’s holy, put that in your documents … I wasted an hour trying to find out what was missing.

I was trying to figure out why the shortcode [s2Member-Login /] isn’t working on my site. Does this shortcode require the Pro Forms version?

And I just found the answer on https://s2member.com/kb-article/introduction-to-s2member/ … yes, I need to Pro version. You really need to make it clear which shortcodes work with the Framework version and which need the Pro version.

The instructions for installing the Pro version need to be edited. Under “Installing the s2Member® Pro Add-on” it says:

In WordPress, go to WordPress Dashboard → Plugins, and then activate the s2Member Framework plugin."

… but above, under "Installing the s2Member® Framework"it says:

In WordPress, go to WordPress Dashboard → Plugins, and then activate the s2Member Framework plugin.

I’m sorry about that. I wasn’t aware of that before you mentioned it. There have been changes in PHP and from what I googled after your question, it seems that the warning is outdated. I have to verify this though. So if WordPress is working, you don’t seem to be having database connection issues, and I suggested ignoring the warning for now and continue with the troubleshooting. I added a note to my to-do to look into this and update the warning if needed.

I was trying to figure out why the shortcode [s2Member-Login /] isn’t working on my site.

Gotcha.

You really need to make it clear which shortcodes work with the Framework version and which need the Pro version.

We usually mention when a feature is Pro or not, even in the forums, but it could have been missed now and then. Could you show me where you saw the s2Member-Login shortcode without saying that it’s a Pro feature, please? Thanks!

… but above, under "Installing the s2Member® Framework"it says:

Yes, they both say the same, and they’re not wrong. The Pro add-on is just uploaded to the plugins folder and will be detected and enabled by the Framework. The instructions assume you are installing s2Member from scratch and mentiones the activation of the Framework as a requisite for the Pro add-on to become active too. I didn’t think it’d cause confusion, but I see your point. I’ll see how it could be improved.

Thanks! :slight_smile:

It looks like the scanner has not been upgraded for PHP 7 where mysql has been deprecated and removed in favor of mysqli and PDO. It should be checking for one of those, and/or the appropriate WPDB methods.

Looks like an issue was opened on GitHub for this. I also checked for an associated pull request and saw none.

2 Likes