tiredofit / docker-freescout

Dockerized web based help desk and shared inbox
MIT License
222 stars 92 forks source link

PHP unable to load dynamic library 'swoole' #190

Closed RisingOpsNinja closed 1 week ago

RisingOpsNinja commented 2 weeks ago

Summary

The PHP module Swoole is enabled although it looks like it is not required by Freescout.

The module cannot be loaded by PHP, because it requires the modules sockets and brotli to be enabled.

This warning is displayed every time PHP is executed:

PHP Warning: PHP Startup: Unable to load dynamic library 'swoole' (tried: /usr/lib/php82/modules/swoole (Error loading shared library /usr/lib/php82/modules/swoole: No such file or directory), /usr/lib/php82/modules/swoole.so (Error relocating /usr/lib/php82/modules/swoole.so: socket_import_file_descriptor: symbol not found)) in Unknown on line 0

Steps to reproduce

  1. Pull image and start container
  2. Execute php -v

What is the expected correct behavior?

No warning displayed when PHP is executed.

Environment

Possible fixes

Swoole should be disabled as in older images like php-8.2-1.17.78 .

Don't create or delete the ini file:

/etc/php82/conf.d/50_swoole.ini

tiredofit commented 2 weeks ago

Thanks for the report. I can reproduce.

This looks like this snuck upstream into tiredofit/nginx-php-fpm image during the automated weekly rebuilds of the image. I'm going to focus my efforts on that image for now and then will issue a new release when that upstream is fixed.

RisingOpsNinja commented 2 weeks ago

Thank you for the quick response!

tiredofit commented 2 weeks ago

Luckily this is an easy fix - It looks like the upstream image was working fine, just had an old version of the PHP engine installed. There are some routines performed in that Docker build to clean up configuration and make sure stray config doesn't get introduced. It looks that when this image is introduced it found an update to the PHP engine, installed them, but didn't perform that cleanup up above leaving stray config around enabling modules. I'll be addressing long term with a new nginx-php-fpm base image in the future when I have time to finalize the testing on it. It's ready to go, just I'm not sure that I'm ready to be able to support the wave of issues as this will change will affect close to 130 Docker images. Trying to avoid another "Tired of I.T!" scenario :laughing:

Have a peek at the latest 1.17.85 release and those warnings will be gone..

RisingOpsNinja commented 1 week ago

Thank you for the explanation. The warning is gone with version 1.17.85