Fork me on GitHub
Subscribe 3

Ticket #420 (fixed bug)

Move the cache dir outside doc root

  • Created: 2011-04-24 10:20:24
  • Reported by: Reines
  • Assigned to: Reines
  • Milestone: 2.0-alpha1
  • Component: caching
  • Priority: normal

If using the file based cache, the cache dir must be moved outside the document root to avoid reading/downloading of the cache files.

History

Franz 2011-04-24 11:07:42

This is hard to do on most shared hosting setups. It also complicates installation...

Any other way around this?

Reines 2011-04-24 11:13:04

Pretty much all shared hosting providers give you a ~/public_html/ or ~/www/ folder for the doc root, so putting it outside that isn't exactly hard.

I agree it does complicate installation a bit though...

The other obvious option (which we do at the moment) is using .php extensions for the cache files to prevent them being downloaded, however the the cache layer supports serialize/var_export/json/xml/yaml, so really storing them in a .php file is a hack since only 1 of those situations it is actually php.

Franz 2011-04-24 15:27:50

How about making the file type an option in the cache module and let FluxBB simply set that option to PHP?

After all, you seemed to use the PHP array storage anyway (though without the PHP tags, if I remember correctly).

Franz 2011-09-17 00:18:13

Commit 4dbec30 to fluxbb fluxbb-2.0

Move Cache config to config.php.

This should basically take care of #420, as it is easy enough for everybody to simply move the directory and then modify the config file.

Reines 2012-01-13 21:03:37

  • Status changed from open to fixed.