Add module to EEv4


#1

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?


#2

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.


#3

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


#4

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


#5

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