Closed juergmessmer closed 9 years ago
What is the actual error message that comes before the stack trace? Apparently unserialize
isn’t successful. But why?
Sorry, here's the message. The only thing I know is it happens while reading a cache file.
[Wed May 07 12:34:28 2014] [error] [client 127.0.0.1] ([code] => 0, [message] => 'Error at offset 704 of 1272 bytes', ...
Maybe it's the tree widget. The last cache file contains this a:5:{s:4:"path";a:3:{i:0;s:7:"modules";i:1;s:6:"widget";i:2;s:4:"tree";}s:4:"type";s:6:"widget";s:4:"name";s:4:"tree";s:7:"folders";a:1:{i:0;s:9:"templates";}s:11:"module_info";a:1:{s:7:"enabled";b:1;}}
Now it doesn't happen anymore in one site. At the other site I click on a few pages in admin pages, logged out and logged in again. Now it doesn't happen anymore either. Have recent base changes somehow affected the serialize and unserialize?
This seems related: I just ran rap parse-resources.php
and got this message (tested in two sites)
PHP Notice: unserialize(): Error at offset 204 of 1523 bytes in /Users/jmg/Sites/cms_altenburg/base/lib/classes/Cache.php on line 163 PHP Stack trace: PHP 1. {main}() /Users/jmg/Sites/cms_altenburg/base/scripts/parse-resources.php:0 PHP 2. require() /Users/jmg/Sites/cms_altenburg/base/scripts/parse-resources.php:5 PHP 3. ResourceFinder->find() /Users/jmg/Sites/cms_altenburg/base/lib/inc.php:40 PHP 4. ResourceFinder->doFind() /Users/jmg/Sites/cms_altenburg/base/lib/classes/ResourceFinder.php:225 PHP 5. ResourceFinder->buildSearchPathList() /Users/jmg/Sites/cms_altenburg/base/lib/classes/ResourceFinder.php:236 PHP 6. ResourceFinder::getPluginPaths() /Users/jmg/Sites/cms_altenburg/base/lib/classes/ResourceFinder.php:366 PHP 7. PluginPart::allPlugins() /Users/jmg/Sites/cms_altenburg/base/lib/classes/ResourceFinder.php:490 PHP 8. SystemPart::allParts() /Users/jmg/Sites/cms_altenburg/base/lib/classes/SystemPart.php:164 PHP 9. Cache->getContentsAsVariable() /Users/jmg/Sites/cms_altenburg/base/lib/classes/SystemPart.php:111 PHP 10. unserialize() /Users/jmg/Sites/cms_altenburg/base/lib/classes/Cache.php:163
You should try to examine the following cache file: 4d72f8aa9456c58b44fbab31fc96de3a
inside the config dir. This is where system parts are cached.
I don't find such a cache file. But I opened one called 4e1d384e7e59fb63298e843c2cbb0d8d.cache and found funny <NUL>
elements
serialize
always uses null
s to terminate identifiers. Maybe I miscalculated the md5. Now it gives me 8e0a656bb90a4077c1a5ac541014649c.
Or just open all of them and search for the name of the class that gives the exception (SplObjectStorage).
Here again, I just opened a few cache files, found "SplObjectStorage", closed them, cleared the cache and now executing rap parse-resources.php
does not fail anymore. No idea :=)
This may be a bug in older PHP versions or an incompatibility between serialized objects of differing versions. We should have an installation with only PHP 5.3 (server and CLI) and test.
@sabberworm is this issue still open? I think it's fixed, but I can't remember how...:=)
766275ca8970ca5217e2b236196131375acff273 fixed this
Whenever I try to log in at a site with a plugin (schulcms-plugin), calling the url domain/admin/pages) a exception is thrown and the session is killed. It doesn't happen when any other admin url is called. So far this only happens when the particular plugin schulcms is installed. It looks like it has something to do with recent changes (PluginPart, order of plugins, etc.?)
••••••••••• exception thown![screen shot 2014-05-07 at 11 11 44](https://cloud.githubusercontent.com/assets/374433/2900686/7a710f16-d5ca-11e3-9b05-a8f5bbec0d29.png)