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 following changes.

  1. We will need to set an encryption key; both sessions and CodeIgniter's encryption functionality require an encryption key to be set in the $config array, so find the following line:

    $config['encryption_key'] = '';

    Change it to the following:

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

    Tip

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

  2. Find these 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['sess_table_name'] = 'ci_sessions';
    $config['sess_match_ip...