Using the 5.x-1.0-beta9 version of the module, I applied the 5.10 serialization patch as required by the module. (I was going to begin by using the file caching method). Before the patch was applied, I could see cache files being ccreated. However, once the patch was applied, I received a WSOD and the following errors:

Notice: Undefined index: cache in sites/all/modules/cacherouter/engines/file.php on line 15

Notice: Array to string conversion in includes/bootstrap.inc on line 434

Warning: require_once(1) [function.require-once]: failed to open stream: No such file or directory in includes/bootstrap.inc on line 970

Fatal error: require_once() [function.require]: Failed opening required '1' (include_path='.:') in includes/bootstrap.inc on line 970

Any ideas? Is there another patch that should be rolled against the latest Drupal core update? Any help would be greatly appreciated.

Comments

torgospizza’s picture

FYI I am using this with the latest build of Drupal, 5.15.

joshk’s picture

It looks like you've got something mis-configured in teh $conf array in settings.php actually. Line 970 in bootstrap is where it loads the caching engine, and that's where the fatal error is coming from. Doublecheck your settings.php $conf overrides.

Also, clear your cache. Once you apply the patch, if there data in there that was set pre-patch, Drupal won't be able to figure it out. That shouldn't be the issue here, but it's something to be aware of when applying that serialization patch.

slantview’s picture

Clear your cache_ files in your cache directory and see if that helps. This is a pretty common error in the memcache module, not as common with cache router. Typically you want to apply the serialization patch and THEN turn on cache router.

Can you include a copy of your configuration too.

Let me know if that works.

Thanks,

Steve

asb’s picture

Hi,

similar problem here; the serialization patch applied cleanly on five D5 sites with separate codebase; three are running fine with "Cache Router", two are completely dead. Error message:

Warning: require_once(A) [function.require-once]: failed to open stream: No such file or directory in /var/www/drupal/includes/bootstrap.inc on line 970

Fatal error: require_once() [function.require]: Failed opening required 'A' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/encycan/includes/bootstrap.inc on line 970

In bootstrap.inc, I can't find any references to /usr/share/pear, but I'm using the PEAR Wiki filter on all five sites. I have no idea why this is working three times and failing twice; the sites are configured pretty similar. In my cache directory there are no cache_ files.

Reverting the patch brought reliably back both broken sites.

Then disabled and uninstalled "Cache Router" module, Re-applied serialization patch again, reloaded the site; several of the usual warnings (those warnings appeared on all sites for a short period), but site's still working:

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /var/www/drupal/includes/database.mysql.inc on line 174

Warning: Unknown column 'serialized' in 'field list' query: UPDATE cache SET data = 'a:1463:{s:13:\"filter_html_1\";i:1;s:18:\"node_options_forum\";a:1:{i:0;s:8:\"moderate\";}s:17:\"menu_primary_menu\";s:1:\"0\";s:19:\"menu_secondary_menu\";s:1:\"0\";s:15:\"install_profile\";s:7:\"default\";s:20:\"comment_upload_seite\";s:1:\"1\";s:35:\"comment_form_anonymous_user_captcha\";i:1;s:18:\"drupal_private_key\";s:64:\"1aacebdda9f1bc6b7094ecd8220d5b1e8aea534156dff2483b707d553bb7c283\";s:19:\"file_directory_temp\";s:3:\"tmp\";s:19:\"file_directory_path\";s:5:\"files\";s:14:\"file_downloads\";s:1:\"1\";s:14:\"cache_lifetime\";s:4:\"3600\";s:14:\"preprocess_css\";s:1:\"1\";s:9:\"site_mail\";s:18:\"kontakt@encycan.de\";s:11:\"site_slogan\" in /var/www/drupal/includes/database.mysql.inc on line 174

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/includes/database.mysql.inc:174) in /var/www/encycan/includes/bootstrap.inc on line 569

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/includes/database.mysql.inc:174) in /var/www/encycan/includes/bootstrap.inc on line 570

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/includes/database.mysql.inc:174) in /var/www/encycan/includes/bootstrap.inc on line 571

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/includes/database.mysql.inc:174) in /var/www/encycan/includes/bootstrap.inc on line 572

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'locale:de' in /var/www/drupal/includes/database.mysql.inc on line 174

Warning: in /var/www/drupal/includes/database.mysql.inc on line 174

Warning: Unknown column 'serialized' in 'field list' query: UPDATE cache SET data = 'a:0:{}', created = 1235513882, expire = 0, headers = '', serialized = 1 WHERE cid = 'locale:en' in /var/www/drupal/includes/database.mysql.inc on line 174

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'locale:de' in /var/www/drupal/includes/database.mysql.inc on line 174

Disabled all caching at /admin/settings/performance, enabled "Cache router" module - site's still working. Re-enabled Drupal core's caching features. This procedure could be reproduced on the broken site.

Lessons learned from this:
* "Typically you want to apply the serialization patch and THEN turn on cache router." - this sems to be of the essence! (please consider adding it to the installation instructions)
* Cache Router and the serialization patch feels a bit fragile.
* I'm desperately missing an administrative page, or at least some reminder that the serialization patch has been applied and the "Cache Router" module is active; maybe /admin/logs/status wouldbe an appropriate place for this? Btw: the vanished statistics page looked pretty cool ;-)
* The Drupal community is great ;-) I wouldn't have solved this in a couple of minutes without this issue and slantview's essential hints.

Thanks a lot & greetings, -asb

PS: Also, I'm missing advice on how to use the different caches in a sensible manner, or how they should/shouldn't be combined. Currently, I'm running my sites with Drupal core's caching features under Lighttpd, that one is running PHP as FastCGI with APC (yes, that does work. Currently I'm evaluating a combined caching strategy with Memcached, but I haven't found out if this even affects Drupal's performance. Also, what about a third layer of caching ("Boost" module). I'd love to hear from user experiences about these scenarios!

slantview’s picture

Status: Active » Closed (fixed)