Bug #80322 [Com]: Preloader does not work as expected

From: Date: Wed, 02 Dec 2020 10:58:27 +0000
Subject: Bug #80322 [Com]: Preloader does not work as expected
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230795@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80322&edit=1 ID: 80322 Comment by: sametsahindogan at gmail dot com Reported by: sametsahindogan at gmail dot com Summary: Preloader does not work as expected Status: Closed Type: Bug Package: opcache Operating System: Ubuntu 20.04.1 LTS PHP Version: 7.4.12 Assigned To: nikic Block user comment: N Private report: N New Comment: It's working now with the 7.4.13. I just want to say thank you for looking into this. Previous Comments: ------------------------------------------------------------------------ [2020-11-12 17:51:22] nikic@php.net The preloading regression (or at least *a* preloading regression) introduced in PHP 7.4.12 has already been fixed. The fix is part of PHP 7.4.13, currently in RC phase. If you still see an issue with PHP 7.4.13, please do tell me. ------------------------------------------------------------------------ [2020-11-12 16:00:12] ricardo dot cescon at panthermedia dot net in addition to my last comments: removing "php7.4-uopz" solve all our problems with opcache ------------------------------------------------------------------------ [2020-11-12 14:41:02] ricardo dot cescon at panthermedia dot net We also see another problem with enabled opcache: traits not will be used correctly. Error: Call to undefined method XYZ::do_something() Sample: ################################ trait tX{ protected function do_something(){ } } //--------- abstract class Y extends Z{ use tX; } //--------- class XYZ extends Y{ function __construct(){ $this->do_something(); } } ################################ Version PHP 7.3.24 work as expected ------------------------------------------------------------------------ [2020-11-12 12:13:13] ricardo dot cescon at panthermedia dot net We have currently a similar problem switching to PHP version 7.4.12, but without Laravel and on Ubuntu 18.04.5 LTS. We get the following error with enabled opcache: Call to undefined method SphinxClient::SetServer() This occurs on the following of code sample ############################################ class sphinxAPI extends SphinxClient { ... function SetServer($host, $port = null) { ... parent::SetServer($this->_servers[0][0], $this->_servers[0][1]); ... ############################################ with opcache.enable = Off everything works as expacted PHP 7.3.24 also work as expacted ------------------------------------------------------------------------ [2020-11-06 16:54:16] jon dot johnson at ucsf dot edu This may be the same as reported in https://github.com/symfony/symfony/issues/39010 where ArgumentCountError: Too few arguments to function Symfony\Component\Cache\Adapter\AbstractAdapter::throwError(), 2 passed in and exactly 4 expected is thrown when pre-loading is enabled. I wasn't able to distill this to a PHP script case, but using symfony I created a docker based reproduction of this at https://github.com/jrjohnson/reproduction-symfony-error-apc-opcache the error can be reproduced there by doing: composer install docker-compose build docker-compose up Then visit http://127.0.0.1:8000/ which will fail with a 500 error and messages logged to the console running docker-compose. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=80322 -- Edit this bug report at https://bugs.php.net/bug.php?id=80322&edit=1

« previous php.bugs (#230795) next »