You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know whether this happens on all platforms, but on my Fedora 37 host machine, PHP CLI segfaults when linting a file (part of our pre-commit hook) on the latest Hypernode Docker (PHP 8.1.12):
The rest of the situation hasn't changed: any other available PHP version just works. And to be complete: this problem only arises in the Docker environment, not on live Hypernode environments and also my host machine (which also runs on 8.1.18) has no problems.
I'd be happy to help, but I don't really know where to start :(
Hi @markvds! Great to hear you have found an intermediate solution :).
In the Docker images we have ionCube enabled by default and we've found that in this specific case it conflicts with opcache. We have disabled ionCube for the PHP 8.1 images, so now it should work out of the box!
$ docker run -it docker.hypernode.com/byteinternet/hypernode-buster-docker-php81-mysql80:latest bash -c 'echo "<?php phpinfo();" | php -l'Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.No syntax errors detected in Standard input code
Thanks for the update! It's something that has been on my to do list for a while now, to disable ionCube by default for our own implementation of the Docker image. We have no customers that use ionCube. A good motivation to finally do this! :-)
As a sidenote: We only have one image that switches php versions while booting. @tdgroot Have you disabled it in the php8.1 configuration of all images (in /etc/php8.1/*/conf.d/), or specifically in the php8.1 images?
Update: It seems that PHP 8.2 has the exact same problem. It segfaults on linting.
Because we now have a customer that actually uses ionCube (for uRapidflow), disabling ionCube was not an option anymore.
For people running into the same problem: Disable opcache in PHP CLI configuration by removing the symlink in /etc/php/8.x/cli/conf.d/10-opcache.ini (where x is the minor PHP version) and you're done! It will definitely have some impact on your CLI performance, but personally I didn't notice any difference.
We added these lines to our own Dockerfile:
# PHP 8.1 & PHP 8.2 Segfault on linting. Disabling opcache module seems to solve the problem.
RUN rm -f /etc/php/8.1/cli/conf.d/10-opcache.ini
RUN rm -f /etc/php/8.2/cli/conf.d/10-opcache.ini
Activity
tdgroot commentedon May 4, 2023
Hi Mark,
Thanks for reporting the problem. We're going to look into this and let you know once it's fixed!
markvds commentedon May 15, 2023
Update: I just noticed a new Hypernode Docker release. I assumed that updating PHP 8.1 would solve the problem, but unfortunately it din't.
The rest of the situation hasn't changed: any other available PHP version just works. And to be complete: this problem only arises in the Docker environment, not on live Hypernode environments and also my host machine (which also runs on 8.1.18) has no problems.
I'd be happy to help, but I don't really know where to start :(
markvds commentedon May 15, 2023
Apparently, I did know where to start :-)
Disabling the
opcache.somodule in cli config (I just removed the symlink/etc/php/8.1/cli/conf.d/10-opcache.ini) seems to solve the issue.This will probably have a minor effect on CLI performance, but I don't think anyone will even notice the difference on their development environment.
tdgroot commentedon May 17, 2023
Hi @markvds! Great to hear you have found an intermediate solution :).
In the Docker images we have ionCube enabled by default and we've found that in this specific case it conflicts with opcache. We have disabled ionCube for the PHP 8.1 images, so now it should work out of the box!
markvds commentedon May 17, 2023
Thanks for the update! It's something that has been on my to do list for a while now, to disable ionCube by default for our own implementation of the Docker image. We have no customers that use ionCube. A good motivation to finally do this! :-)
As a sidenote: We only have one image that switches php versions while booting. @tdgroot Have you disabled it in the php8.1 configuration of all images (in
/etc/php8.1/*/conf.d/), or specifically in the php8.1 images?markvds commentedon Sep 3, 2024
Update: It seems that PHP 8.2 has the exact same problem. It segfaults on linting.
Because we now have a customer that actually uses ionCube (for uRapidflow), disabling ionCube was not an option anymore.
For people running into the same problem: Disable opcache in PHP CLI configuration by removing the symlink in
/etc/php/8.x/cli/conf.d/10-opcache.ini(where x is the minor PHP version) and you're done! It will definitely have some impact on your CLI performance, but personally I didn't notice any difference.We added these lines to our own
Dockerfile: