PHP Fatal error: Cannot redeclare with opcache.preload and Composer autoload between releases #3591
Unanswered
gremo
asked this question in
Help needed
Replies: 1 comment 5 replies
-
Try this one: https://ï.at/avoid-php-fpm-reloading |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My project is Symfony based, and uses the following opcache configuration:
opcache.preload = /var/www/vhosts/myproject/httpdocs/current/config/preload.php
It works the first time I activate the configuration. Next time I'll deply a new version, you got errors in PHP logs:
As you can see the release 1 "conflict" with release 2 because the same function is redeclared and still in memory (I think).
Adding
after('deploy:symlink', 'cachetool:clear:opcache')
doesn't help to solve the issue.What I'missing?
Beta Was this translation helpful? Give feedback.
All reactions