Bug #58969
closedCall to a member function boot() on a non-object
0%
Description
CATEGORY: PackageManager/Cache
After deploying the project with TYPO3.Surf i can't open the Back- and Frontend. I get following error:
2014/05/20 17:14:11 [error] 23117#0: *3107 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to a member function boot() on a non-object in /data/www/<homepage>/shared/typo3cores/typo3_src-6.2.2/typo3/sysext/core/Classes/Package/PackageManager.php on line 151" while reading response header from upstream, [...]
i debugged the core to see what happens.
In PackageManager line 261
$this->packages = unserialize($packageObjects);
unserialize returns false, but does not throw E_NOTICE (as described on php.net, i enabled all error outputs)
i checked all permissions and filemodes, they are all set to user:group of nginx, i tried filemodes from 600 to 777 for all cache-files inside typo3temp/Cache/Code/cache_core
Deleting those Files does not change the behaviour. Clearing Caches in the Install tool doesn't either (sometimes it actually did, but i you can't rely on that). Only a accidental click on "Clear PHP opcode cache" made it working.
This lead to the idea to temporarily disable the zend extension and, i was surprised, it worked. flawless.
Now, since i can't disable opcache for the deployment, and the problem will keep showing up, i start questioning unserialize(), why does it return false but i don't E_NOTICE ? sorry, unsolved until yet, but why is there no check for successful unserialization? the result is just written into
$this->activePackagesfor every marked "active" package in an other (cached) file, leading to an associative array of NULLs.
My suggestion would be:
if the return of unserialize() is false, clear opcache if available and rebuild the cached files in (at least) typo3temp/Cache/Code/cache_core. or just read the configuration vom the original file, as i would expect a system to behave when cached information is corrupt or unavailable.
I think this fix is important, because anyone with opcache enabled might suffer from this. (Suffer, because it's a frustrating error. took me more than a few days to finally discover the root cause)