Closed sethicis closed 1 year ago
Fyi, @tyancolte
@sethicis
Once you can installed the mailparse extension with version defined like this:
php-mailparse php8-mailparse
Kind Respects, Uvdesk Team
@Komal-sharma-2712 , those packages don't exist in alpine. You can see a full list of what's available in alpine here
There is a php8-pecl-mailparse
, which I originally used, but that doesn't get linked properly, which is why I switched to using install-php-extensions mailparse imagick
.
install-php-extensions
comes from mlocati/php-extension-installer
which is a tool built to assist in adding php extensions to docker images. You can read more about it here.
@Komal-sharma-2712 , how does the system requirements check for mailparse work? Is it not just using get_loaded_extensions
in PHP?
Ok, I found where it does the system requirement checks. https://github.com/uvdesk/community-skeleton/blob/master/src/Controller/ConfigureHelpdesk.php#L79
It uses extension_loaded
to check, so I ran the same logic in the cli:
php -r 'var_dump(extension_loaded("mailparse"));'
bool(true)
Ok, I've got this figured out. The issue has to do with how the base image is created. In my Dockerfile I install fpm and php packages via apk
, but the php8 I'm running is baked into the image itself.
The baked in version of PHP is compiled with a different extensions directory and scan directory set. This is why when I check php-cli everything seems to be present, but the php-fpm can't find mailparser.
install-php-extensions
installs extensions to the location that the base image version of php8 (php-cli), expects, so it reports everything is ok.
While php-fpm, installed via apk
is looking in a completely different place for its configs and extensions, so it reports things are missing.
The solution I'm working on is changing my image to be based on php8.0:fpm-alpine, so that both php-cli and fpm have the same compiled configuration. Then I'm going to use install-php-extensions
to install any missing extensions.
Thank you all for your help. This is no longer an issue with uvdesk, just my own Docker image work -- closing this issue.
The Issue
I'm working on a Docker image for PHP8-alpine with apache2 and uvdesk/community-skeleton. I got the image to build and uvdesk setup to startup, but when uvdesk does its requirements check it always fails on the mailparse extension verification. (See below)
I verified the mailparse extension is loaded with the below methods:
I'm kind of at a loss as to why the uvdesk requirements check is saying the mailparse extension is missing. Any assistance that you can provide would be much appreciated.
My
Dockerfile