docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.79k stars 2k forks source link

FPM 8.1 Bullseye: segfault on scripts encoded with IonCube Encoder 12 #1387

Closed Wexter closed 1 year ago

Wexter commented 1 year ago

PHP-FPM (and CLI) always fails to execute scripts encoded with IonCube 12 with segmentation fault. I've lost full day trying to find the cause of this issue, tried with different versions of PHP (from 8.1.0 to 8.1.17) and different IonCube Loader (12.0.1 to 12.0.5). Discovered that issue is present ONLY on php:8.1-fpm image, php:8.1 works fine without segfault. I guessed that problem is probably in compile configuration flags. Checked what's the difference between php:8.1 and php:8.1-fpm and saw that php:8.1 has flags --enable-phpdbg --enable-phpdbg-readline --enable-embed, which php:8.1-fpm doesn't have. So I cloned project, added these flags to 8.1/bullseye/fpm/Dockerfile, built image and PHP-FPM stopped failing with encoded scripts. Don't know what these flags do and why they are not added to FPM image. But I think that they need to be there.

Wexter commented 1 year ago

Duplicate of https://github.com/docker-library/php/issues/1386, don't know why GitHub created it twice