Book Image

CodeIgniter Web Application Blueprints

Book Image

CodeIgniter Web Application Blueprints

Overview of this book

Table of Contents (16 chapters)
CodeIgniter Web Application Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adjusting the config.php file


There are a few things in this file that we'll need to configure to support sessions and encryption. So, open the config/config.php file and make the changes described in this section.

We will need to set an encryption key. Both sessions as well as CodeIgniter's encryption functionality require an encryption key to be set in the $config array, so perform the following steps:

  1. Find the following line:

    $config['encryption_key'] = '';

    Change it to the following:

    $config['encryption_key'] = 'a-random-string-of-alphanum-characters';

    Tip

    Now, don't actually change this value to literally a-random-string-of-alphanum-characters obviously, but change it to, er, a random string of alphanum characters—if that makes sense. Yeah, you know what I mean.

  2. Find the following lines:

    $config['sess_cookie_name'] = 'ci_session';
    $config['sess_expiration'] = 7200;
    $config['sess_expire_on_close'] = FALSE;
    $config['sess_encrypt_cookie'] = FALSE;
    $config['sess_use_database'] = FALSE;
    $config[...