Add module to EEv4

Hello,

I tried to add module bcmath and exif to my wordpress site.

I use command

ee shell example.com --command='docker-php-ext-install pdo_mysql' --user=root

it runs well but after that the module is not active

i saw that the module need to be ‘make test’ isn’t it?

1 Like

You also need to run docker-php-ext-enable after installing an extension.

Note that this change will get reverted if when you will update EE or enable/disable admin tools.

It seem that the command docker-php-ext-enable is more correct

This is what i run on my wp site

root@localhost:~# ee shell example.com --command='docker-php-ext-enable' --user=root
usage: /usr/local/bin/docker-php-ext-enable [options] module-name [module-name ...]
   ie: /usr/local/bin/docker-php-ext-enable gd mysqli
       /usr/local/bin/docker-php-ext-enable pdo pdo_mysql
       /usr/local/bin/docker-php-ext-enable --ini-name 0-apc.ini apcu apc

Possible values for module-name:
bcmath.so exif.so gd.so imagick.so imap.so mcrypt.so memcache.so memcached.so mysqli.so opcache.so redis.so soap.so sodium.so zip.so

Some of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.
root@localhost:~# ee shell example.com --command='docker-php-ext-enable bcmath' --user=root

warning: bcmath (bcmath.so) is already loaded!

root@localhost:~# ee shell example.com --command='docker-php-ext-enable exif' --user=root

warning: exif (exif.so) is already loaded!

However, while i check Health Check on my site, it’s still not loaded

Thanks @kirtan. Any clue on how to install an extension and persist it through updates or toggling Admin Tools?

root@serv-jc-08:~# docker-php-ext-enable
docker-php-ext-enable: command not found

First, I installed the extension by running the above code, but my issue wasn’t resolved. I then run the following one below without any success…

I then make a little twisting to the code by adding pdo_mysql to have the below code

ee shell domain --command='docker-php-ext-enable pdo_mysql' --user=root

All to no success.

Have anybody been able to solve this issue?

Below is an error from mailpoet plugin about the required extension

  • MailPoet Error: MailPoet requires a PDO_MYSQL PHP extension. Please read our instructions on how to resolve this issue.*
:~$ sudo ee shell domain.com --command='docker-php-ext-enable pdo_mysql' --user=root

warning: pdo_mysql (pdo_mysql.so) is already loaded!

But still yet, mailpoet is still reporting error on the admin dashboard of my site…