Skip to content

Instantly share code, notes, and snippets.

@sime
Last active December 12, 2015 08:39
Show Gist options
  • Select an option

  • Save sime/4746187 to your computer and use it in GitHub Desktop.

Select an option

Save sime/4746187 to your computer and use it in GitHub Desktop.
When running CakePHP on Heroku, by default you'll see file permission errors. The Heroku filesystem is read-only, but '/tmp' and '/log' are writable. To remove the errors update Config::config() in core.php
<?php
// Heroku Read-only Filesystem https://devcenter.heroku.com/articles/read-only-filesystem
/**
* Configure the cache used for general framework caching. Path information,
* object listings, and translation cache files are stored with this configuration.
*/
Cache::config('_cake_core_', array(
'engine' => $engine,
'prefix' => $prefix . 'cake_core_',
'path' => '/tmp/', # New Path
'serialize' => ($engine === 'File'),
'duration' => $duration
));
/**
* Configure the cache for model and datasource caches. This cache configuration
* is used to store schema descriptions, and table listings in connections.
*/
Cache::config('_cake_model_', array(
'engine' => $engine,
'prefix' => $prefix . 'cake_model_',
'path' => '/tmp/', # New Path
'serialize' => ($engine === 'File'),
'duration' => $duration
));
@armnosn
Copy link
Copy Markdown

armnosn commented Feb 12, 2013

it works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment