Hi,

When setting up this module I added the following to my settings.php file:

$conf['cache_inc'] = './sites/all/modules/contrib/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'db',
    'server' => array(),
    'shared' => TRUE,
    'prefix' => '',
    'path' => 'sites/default/files/filecache',
    'static' => FALSE,
    'fast_cache' => TRUE,
  ),
);

It immediately crashed my site saying that there was a parse error...expecting a ")" on line xx, which is the [ 'default' => array( ] line.

For someone like myself, a humble novice, are there default settings that I need to add to these lines?

Please advise, as I've been at this for a few days and can't find this issue in the que. Maybe it's something simple, but when I read the readme.txt file and the project page it isn't quite clear how I need to modify this code in the settings.php file.

Any help/guidance would be greatly appreciated. If this is a really long answer and requires custom configuration, I'm more than happy to pay someone to lend me a hand for an hour or two.

Thanks,

CarbonPig

http://carbonpig.com

Comments

dunklea’s picture

Yeah I am having the same problems, I copy and paste the code provided but the new settings.php file crashes my site. Please advise.

Thanks!

vingalls’s picture

double check the path to the module in the default settings. I had the same problem then realized that the path is going to a contrib folder before it gets to the module directory.

mattwmc’s picture

Same here.

The path is incorrect in the Read Me File.

remove 'contrib'

thedavidmeister’s picture

Status: Active » Closed (won't fix)

The path is not "incorrect" in the readme file, it is just an example. Putting contrib modules in a subdirectory of modules called "contrib" and custom modules in one called "custom" is kinda common practice.

mattwmc’s picture

well it's the first I've heard of it.

Always been told to put core modules in /modules and all others in sites/all/modules

thedavidmeister’s picture

If you're building a distribution profile ./profiles/[profile_name]/modules is a valid place to put modules.

If you're running a multisite setup and want a module to be available to only one of the sites ./sites/[domain]/modules is also valid. In this case ./sites/default/modules can also be ok.

Putting a module in a subdirectory of /modules is also fine, so I've personally come across quite a few splits for organisational reasons like "contrib", "custom", "distro", "features".

If you're using drush and have a folder called "contrib" then run "$ drush dl [module_name]" it will automatically detect it and put your modules in contrib.

The "modules always go in sites/all/modules" line is something you learn before you've learned about building installation profiles, working with multisites and using drush with makefiles.

The only thing you could really put in the README that would be equally fair to all these setups would be something like this:

  $conf['cache_inc'] = './path/to/cacherouter/cacherouter.inc';

but then, that configuration obviously doesn't work for *anyone* out of the box, so arguably it is "wrong" too...