PHP Extensions Required by WordPress

Hi Folks,

I have started to migrate over from a shared server to a VPS and have spent the past couple of weeks resolving internal errors produced by the ModSecurity feature(s), which was creating a whole array of issues, however, it now seems I have managed to resolve it - with very few [id:‘issues’] left to tidy up… fingers are crossed it holds!

While all internal dynamic operations are working now, where they weren’t before… I have run a site health test to make sure everything is functioning right according to the site itself.

Bouncing off such posts as, PHP Extensions - 15418 - General Interworx Control Panel Info

…and that I appreciate that IW mods are still in the pipeline, how do I check to see if particular PHP Modules/Extensions are running through SSH?

For example, WordPress is asking for recommended functions, which I know would normally be identifiable in cPanel PHP Options:

  • Warning The optional module, bcmath, is not installed or has been disabled.
  • Warning The optional module, imagick, is not installed or has been disabled.

Additionally, I would like to run a check to see if these in the below links list are running too; this is based on the WordPress Recommendations, here:
Server Environment, PHP Extensions – Make WordPress Hosting

Thank you in advance
John

Hello–

Running php -m and looking through the output should tell you what is installed/in use for that version of php.

Please remember if you’re not using the “System PHP” version, you’ll need to run the command against the version of php that site is running. For example, if you enabled multi-PHP and set the site to PHP 7.4, you would need to run php74 -m and look through the list provided.

Additionally, this article should help you determine if the yum package for the extension is installed on your system at all: How To: Install PHP Extensions for InterWorx — InterWorx documentation. Simply find the corresponding package name using the instructions above and then run yum info {insert package name here}. For example, if the site was using PHP 5.6 and I needed “pecl-zip” extension, I could run yum info php54-php-pecl-zip and read the output to see if it was installed.

Thank you,
Brandon

Hi, @iworx-brandon

Thanks for getting back to me so soon…

Ok. Utilising php74 -m (and php81) as described in your reply… They are all there, both the above listed and those on the WordPress site, which would suggest the two are disabled/inactive.

I ran the following:

root@ip.ad.dr.ess:/# php74 --ri bcmath
bcmath

BCMath support => enabled

Directive => Local Value => Master Value
bcmath.scale => 0 => 0
root@ip.ad.dr.ess:/#

It says bcmath is enabled (same for - imagick), does this mean it is functioning and the site is not picking it up and if so, is there a required connector/invocation command for the PHP module to pick up from the site; otherwise something to do with php.ini?

Appreciated
John

How do…

Update: Resolved

Just to let you know, it was the version number within the account. The SiteWorx account had shifted to PHP8.1 (system default), and after changing it to v7.4, it seems to have resolved the issue.

WordPress has definitely not caught up with v8.1 yet.

Kind Regards
John