s2i-php-container icon indicating copy to clipboard operation
s2i-php-container copied to clipboard

What is the best practice for adding extension?

Open nak3 opened this issue 9 years ago • 1 comments

I tried to add extensions by using PHP_INI_SCAN_DIR like https://github.com/nak3/openshiftv3-php with customizing *.ini:

extension = /opt/app-root/src/lib/modules/tidy.so

However, it overwrites default extensiton /opt/rh/php55/root/usr/lib64/php/modules. What is the best way to install PHP extensions?

OpenShift v2 has pear.txt and it might be good idea if we could use them on v3. (I know it is possible by customizing sti-image, but some users don't like use customized image.)

nak3 avatar Feb 08 '16 07:02 nak3

I think "pear" is still used, but with very low usage compared to composer, and pear package can also be managed by composer (despipe composer is NOT an installer, only a dependency resolver)

About PHP_INI_SCAN_DIR, this var. can be a colon separated list, so can includes various paths if needed (this have been developed especially for SCL, and introduced, IIRC, in PHP 5.5). This work like MAN_PATH, i.e. an empty path means "default".

remicollet avatar Apr 05 '16 05:04 remicollet

This issue is related to PHP-5.5 that is pretty old and out of support. If it is valid for PHP-7.3 and above, feel free to reopen this issue. Otherwise closing it.

phracek avatar Mar 28 '23 07:03 phracek