As Jakub mentioned, exactly one MINIT/MSHUTDOWN per process will only fix one of your problems, but I do like the step in that direction.
I express my sympathy and condolences: I've had my own share of woes with the fact that env var and INI changes are not complete during MINIT due to fcgi protocol/php-fpm. It's very annoying for extensions! I always install all hooks that might be needed, and have runtime checks if they are actually enabled. Not ideal, and sadly one MINIT/MSHUTDOWN will not fix it. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php