title: codeigniter Filename: libraries/Session/drivers/Session_database_driver.php
body: <p>I have errors in CI</p>
  
  <pre><code>Error Number: 2006
  
  MySQL server has gone away
  
  UPDATE `ci_sessions` SET `timestamp` = 1475160630 WHERE `id` = 'a0ee72450a40e6e030aa1f3c5b6e2db8b6efc2cf'
  
  Filename: libraries/Session/drivers/Session_database_driver.php
  
  Line Number: 243
  </code></pre>
  
  <p>and </p>
  
  <p>Error Number: 2006</p>
  
  <pre><code>MySQL server has gone away
  
  SELECT RELEASE_LOCK('a0ee72450a40e6e030aa1f3c5b6e2db8b6efc2cf') AS ci_session_lock
  
  Filename: libraries/Session/drivers/Session_database_driver.php
  
  Line Number: 367
  </code></pre>
  
  <p>I googled for solutions and find answer here </p>
  
  <p><a href="https://stackoverflow.com/questions/26960544/codeigniter-error-session-db">Codeigniter error session DB</a></p>
  
  <p><a href="https://stackoverflow.com/questions/26960544/codeigniter-error-session-db/29459563">Codeigniter error session DB</a></p>
  
  <p>but above solution didnot worked for my problem.</p>
  
  <p>here is my config.php </p>
  
  <pre><code>defined('BASEPATH') OR exit('No direct script access allowed');
  
  $config['base_url'] = "";
  
  $config['index_page'] = '';
  
  $config['uri_protocol'] = '';
  
  $config['url_suffix'] = '';
  
  $config['language'] = 'english';
  
  $config['charset'] = 'UTF-8';
  
  
  $config['enable_hooks'] = FALSE;
  
  $config['subclass_prefix'] = 'MY_';
  
  $config['composer_autoload'] = FALSE;
  
  $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  
  
  $config['allow_get_array'] = TRUE;
  $config['enable_query_strings'] = FALSE;
  $config['controller_trigger'] = 'c';
  $config['function_trigger'] = 'm';
  $config['directory_trigger'] = 'd';
  
  $config['log_threshold'] = 0;
  
  
  $config['log_path'] = '';
  
  $config['log_file_extension'] = '';
  
  
  $config['log_file_permissions'] = 0644;
  
  $config['log_date_format'] = 'Y-m-d H:i:s';
  
  $config['error_views_path'] = '';
  
  $config['cache_path'] = '';
  
  
  $config['cache_query_string'] = FALSE;
  
  $config['encryption_key'] = '';
  
  
  $config['sess_driver'] = 'database';
  $config['sess_save_path'] = 'ci_sessions'; 
  $config['sess_cookie_name'] = 'ci_session';
  $config['sess_expiration'] = 86400;
  $config['sess_match_ip'] = FALSE;
  $config['sess_time_to_update'] = 86400;
  $config['sess_regenerate_destroy'] = FALSE;
  
  $config['cookie_prefix']    = '';
  $config['cookie_domain']    = '';
  $config['cookie_path']      = '/';
  $config['cookie_secure']    = FALSE;
  $config['cookie_httponly']  = FALSE;
  
  $config['standardize_newlines'] = FALSE;
  
  $config['global_xss_filtering'] = FALSE;
  
  $config['csrf_protection'] = FALSE;
  $config['csrf_token_name'] = 'csrf_test_name';
  $config['csrf_cookie_name'] = 'csrf_cookie_name';
  $config['csrf_expire'] = 7200;
  $config['csrf_regenerate'] = TRUE;
  $config['csrf_exclude_uris'] = array();
  
  $config['compress_output'] = FALSE;
  
  $config['time_reference'] = 'local';
  
  $config['rewrite_short_tags'] = FALSE;
  
  $config['proxy_ips'] = '';
  </code></pre>