the problem is in the following:
echo 'Hello...'; die('I died...'); echo 'HAHAHA!!!';
on the web browser it is executing the echo after the die(). on the CLI stops on the die() and does not shows the echo as expected.
My Specs: PHP 7.4 (FPM) web server Nginx (also tried with apache with the same result)
Also I had a time long a test server on windows and it was exiting the script when exit or die was called, but somehow on the debian test server is not doing that.
is there something I am missing? do you guys have any tip?
Thanks in advance….
Update on 2022-07-27 :
I’ve updated the PHP version (same happening):
@MarkusZeller yes is disabled the opcache:
still not working… but somehow on the windows server under php7.4.26 runs the script with the expected die
The development environment is windows with Debian 11 (WSL2) I have also tried it yesterday on a test machine I have in my home with base Debian 11 installed and it has the same issue. Same thing with the Debian 11 test server at work.
@YourCommonSense the script is the same. Here is the nginx path config:
Advertisement
Answer
Solution:
The cause of the problem was on the extension php-uopz. After installing every extension individually and testing after every install, the behavior only happens after this extension is activated. Hope this helps in case anyone runs into the same issue.