I got these errors after enabling the module and adding config options to settings.php

Am I missing something else to required for install?

Notice: Undefined index: cache in /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php on line 12

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /Applications/MAMP/htdocs/stocksite/includes/database.mysql.inc on line 172

Notice: Undefined index: cache in /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php on line 12

Warning: Unknown column 'serialized' in 'field list' query: UPDATE cache SET data = 'a:181:{s:13:\"theme_default\";s:7:\"garland\";s:13:\"filter_html_1\";s:1:\"1\";s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}s:17:\"menu_primary_menu\";i:2;s:19:\"menu_secondary_menu\";i:2;s:15:\"install_profile\";s:7:\"default\";s:17:\"node_options_page\";a:2:{i:0;s:6:\"status\";i:1;s:8:\"revision\";}s:12:\"comment_page\";i:0;s:14:\"theme_settings\";a:1:{s:21:\"toggle_node_info_page\";b:0;}s:18:\"drupal_private_key\";s:64:\"86573c173617c71bf6b9e499461b6cb826aa098f2a6fa1b178bb7a990480e2a2\";s:19:\"file_directory_temp\";s:8:\"/usr/tmp\";s:9:\"cron_last\";i:1207299278;s:9:\"clean_url\";s:1:\"1\";s:18:\"update_status_last\";i:1207346585;s:15:\"simplemenu_menu\" in /Applications/MAMP/htdocs/stocksite/includes/database.mysql.inc on line 172

Notice: Undefined index: cache_page in /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php on line 12

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache_page WHERE cid = 'http://localhost:8888/stocksite/' in /Applications/MAMP/htdocs/stocksite/includes/database.mysql.inc on line 172

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php:12) in /Applications/MAMP/htdocs/stocksite/includes/bootstrap.inc on line 531

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php:12) in /Applications/MAMP/htdocs/stocksite/includes/bootstrap.inc on line 532

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php:12) in /Applications/MAMP/htdocs/stocksite/includes/bootstrap.inc on line 533

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/stocksite/sites/all/modules/cacherouter/Cache.php:12) in /Applications/MAMP/htdocs/stocksite/includes/bootstrap.inc on line 534

Notice: Undefined property: stdClass::$theme in /Applications/MAMP/htdocs/stocksite/includes/theme.inc on line 45

Comments

jpsalter’s picture

I am running site locally using MAMP. The settings file is not located in the "default" folder but a folder named "8888.localhost.stocksite".

Should I put in a 'prefix'? If so, how should it be written?

Thanks

shariharan’s picture

Same here. When I opt for default caching, the page is with loads of error. When I try the file based caching it shows "could not create directory error"
Please help !!!

shariharan’s picture

This is the file based caching error

# Failed to create directory /tmp/filecache.
# Failed to create directory /tmp/filecache/cache.
# Failed to create directory /tmp/filecache/cache/8.
# Failed to create directory /tmp/filecache/cache_content.
# Failed to create directory /tmp/filecache/cache_content/7.
# Failed to create directory /tmp/filecache/cache_views.
# Failed to create directory /tmp/filecache/cache_views/5.
# Failed to create directory /tmp/filecache/cache_views/7.
# Failed to create directory /tmp/filecache/cache_views/c.

# Cache write error, failed to open file "/tmp/filecache/cache/8/87cd8b8808600624d8c590cfc2e6e94b"
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: fopen(/tmp/filecache/cache_content/7/7f850b976f5a7d66e6eea55253be0848) [function.fopen]: failed to open stream: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 93.
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: fopen(/tmp/filecache/cache_views/5/514faf5a71b4f0f67374c388f37aa0d7) [function.fopen]: failed to open stream: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 93.
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: fopen(/tmp/filecache/cache_views/7/71798f5c8fca267bca3e183110382c5a) [function.fopen]: failed to open stream: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 93.
# warning: mkdir() [function.mkdir]: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 149.
# warning: fopen(/tmp/filecache/cache_views/c/c365329cc7e28194e0ef48fbcdf73b80) [function.fopen]: failed to open stream: No such file or directory in C:\server\Apache2.2\htdocs\test1\sites\all\modules\cacherouter\engines\file.php on line 93.

slantview’s picture

Status: Fixed » Active

Ok, there are two errors here. Number one which I forgot to add in the instructions, is that if you use this for Drupal 5.x you MUST use the cache serialization patch. I added these to the repository, and I will create a new release with these included.

Second, I need to add the ability to define where the file storage is for file cache. Currently it uses /tmp/filecache, which you must have write permission with the web server user.

I will fix these and get a new commit in shortly.

Thank you so much for helping me work out these issues :)

-s

slantview’s picture

Status: Active » Fixed

I committed the fixes for these in the beta4 release. because this is still beta, you must uninstall the module and re-install for it to update correctly.

Check the documentation on the project page to see how to override the default path of /tmp/filecache

slantview’s picture

Status: Active » Fixed

@jpsalter -

You can add the settings into any settings.php. To use the prefix, you can add a simple string, but usually you will only need it with memcache, apc, or xcache. DB and file don't need it.

For file caching, just change "path" to the location of the file cache storage. You can use something like 'files/cache' and it will work on your local "files" dir.

-s

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.