Search Engine

Saturday, May 15, 2010

Optional Configuration

There are two other items that can be configured. Most developers complete these laundry-list items, but they're not required for this tutorial. One is defining a custom string (or "salt") for use in security hashes. The second item is allowing CakePHP write access to its tmp folder.

The security salt is used for generating hashes. Change the default salt value by editing /app/config/core.php line 153. It doesn't much matter what the new value is, as long as it's not easily guessed.

Plain Text View

  1. /**
  2. * A random string used in security hashing methods.
  3. */
  4. Configure::write('Security.salt', 'pl345e-P45s_7h3*S@l7!');
  5. ?>

The final task is to make the app/tmp directory web-writable. The best way to do this is to find out what user your webserver runs as () and change the ownership of the app/tmp directory to that user. The final command you run (in *nix) might look something like this.

Plain Text View
$ chown -R www-data app/tmp

  1. $ chown -R www-data app/tmp

If for some reason CakePHP can't write to that directory, you'll be informed by a warning while not in production mode.


Post a Comment