docker-php-5.3-apache icon indicating copy to clipboard operation
docker-php-5.3-apache copied to clipboard

Can't install bcmath through docker-php-ext-install

Open Mo0812 opened this issue 6 years ago • 3 comments

When I try to install the module bcmath through docker-php-ext-install I get the following error:

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
docker-php-ext-enable bcmath.so
/usr/local/bin/docker-php-ext-enable: line 61: /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini: No such file or directory

Do you have any advice how to fix it?

Mo0812 avatar Oct 26 '18 08:10 Mo0812

same issue when installing gd library

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Installing header files:          /usr/local/include/php/
docker-php-ext-enable gd.so 
/usr/local/bin/docker-php-ext-enable: line 61: /usr/local/etc/php/conf.d/docker-php-ext-gd.ini: No such file or directory
ERROR: Service 'app' failed to build: The command '/bin/sh -c docker-php-ext-install gd' returned a non-zero code: 1

raphaelsoul avatar Dec 20 '18 08:12 raphaelsoul

PHP ini file path is broken in docker-php-ext-enable. https://github.com/eugeneware/docker-php-5.3-apache/blob/master/docker-php-ext-enable#L59

I fixed it with $PHP_INI_DIR env.

ini="$PHP_INI_DIR/conf.d/docker-php-ext-$ext.ini"

You can copy a fixed script.

FROM eugeneware/php-5.3
COPY ./fixed-docker-php-ext-enable /usr/local/bin/docker-php-ext-enable
RUN docker-php-ext-install curl

hareku avatar Feb 06 '19 01:02 hareku

PHP ini file path is broken in docker-php-ext-enable. https://github.com/eugeneware/docker-php-5.3-apache/blob/master/docker-php-ext-enable#L59

I fixed it with $PHP_INI_DIR env.

ini="$PHP_INI_DIR/conf.d/docker-php-ext-$ext.ini"

You can copy a fixed script.

FROM eugeneware/php-5.3
COPY ./fixed-docker-php-ext-enable /usr/local/bin/docker-php-ext-enable
RUN docker-php-ext-install curl

you should post a PR with this. I also experimented this problem (installing another extension), and with your fix I solved it.

jquinter avatar Sep 05 '19 02:09 jquinter