frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

How to install php extensions?

Open dylanblokhuis opened this issue 2 years ago • 7 comments

Installing a php8.2-{extension} and moving the .so into /usr/local/lib/php/extensions/no-debug-zts-20220829 will end up with a core_symbols error.

dylanblokhuis avatar Oct 15 '22 10:10 dylanblokhuis

Your extensions must be compiled with ZTS enabled.

dunglas avatar Oct 15 '22 10:10 dunglas

Thanks, got it. I managed to add extensions by adding --with-{extension} flags while building the frankenphp branch of php-src.

dylanblokhuis avatar Oct 15 '22 11:10 dylanblokhuis

Shouldn't we compile all extensions in the docker image and allow users to use "extension=..." in their custom php.ini conf?

Pierstoval avatar Oct 15 '22 15:10 Pierstoval

This could indeed be a good idea. How does the official PHP image? The Docker image needs to be entirely revamped anyway, it could be improved a lot.

dunglas avatar Oct 15 '22 15:10 dunglas

I'm working right now on allowing to customize php.ini in a more common way, but if we want to compile everything, I guess we can add --enable-all in the "configure" call, add the missing phpize dependencies, and it should be doable.

Pierstoval avatar Oct 15 '22 16:10 Pierstoval

Is there any way to allow it to "just work" with https://github.com/mlocati/docker-php-extension-installer?

withinboredom avatar Oct 17 '22 09:10 withinboredom

See https://github.com/dunglas/frankenphp/pull/29#issuecomment-1280549452

dunglas avatar Oct 17 '22 09:10 dunglas

Fixed by #33

dunglas avatar Oct 19 '22 05:10 dunglas