title: Codeigniter cannot load libraries
body: <p>Initially, I thought I had a problem with loading libraries due to using Modular Extensions inside Codeigniter.</p>
  
  <p>However I have discovered even with a clean install of codeigniter I am unable to load libraries such as the <code>Session library</code> or even the Migration library.</p>
  
  <p>I always get similar error messages usually to do with loading files.</p>
  
  <p>Here is my error message I have when using the Session library. </p>
  
  <p><strong>Note:</strong> If i don't use libraries everything works fine.</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>A PHP Error was encountered<br>
         Severity: Warning<br>
         Message: mkdir() [function.mkdir]: Invalid argument<br>
         Filename: drivers/Session_files_driver.php<br>
         Line Number: 117</p>
    
    <p>Backtrace:<br>
         File: index.php
         Line: 301
         Function: require_once</p>
    
    <p>An uncaught Exception was encountered<br>
         Type: Exception<br>
         Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.</p>
    
    <p>Filename: \system\libraries\Session\drivers\Session_files_driver.php<br>
         Line Number: 119</p>
    
    <p>Backtrace:<br>
         File: index.php
         Line: 301
         Function: require_once</p>
  </blockquote>
  
  <p>I feel like this is some form of permissions issue, but whether I am using AMPPS, MAMP (Windows) or XAMP I always get this problem.</p>
  
  <p>Does anyone have any ideas</p>
  
  <p><strong>OS</strong>: Windows 8.1</p>
  
  <p><strong>Webserver</strong>: AMPPS/MAMP(Windows)/XAMP - All have the problem.</p>
  
  <p><strong>Codeigniter</strong>: v3.0.0</p>
  
  <p><strong>Config</strong>:</p>
  
  <pre><code>$config['sess_driver'] = 'files';
  $config['sess_cookie_name'] = 'ci_session';
  $config['sess_expiration'] = 7200;
  $config['sess_save_path'] = NULL;
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 300;
  $config['sess_regenerate_destroy'] = FALSE;
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Resolved.</p>
  
  <p>It's important now that you use the CI3 Documentation, When using the database method for sessions please ensure you use the updated SQL to create the table.</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `ci_sessions` (
  
          `id` varchar(40) NOT NULL,
          `ip_address` varchar(45) NOT NULL,
          `timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
          `data` blob NOT NULL,
          PRIMARY KEY (id),
          KEY `ci_sessions_timestamp` (`timestamp`)
  );
  </code></pre>
  
  <p>As found <a href="http://www.codeigniter.com/userguide3/libraries/sessions.html#session-drivers" rel="noreferrer">here</a>. I hope this helps anyone out with similar problems.</p>
  
  <p>Also for the initial problem if you are using the <code>files</code> driver please ensure you set the <code>$config['sess_save_path']</code> to something like <code>'ci_sessions'</code> or wherever you wish to store. Please see @Tpojka answer for more information.</p>