GithubHelp home page GithubHelp logo

codeigniter-session-memcached's Introduction

Codeigniter Session Memcached

An extension of the Session class to enable the use of memcached to store session information.

To enable this, copy MY_Session.php to application/libraries and memcached.php to application/config.

Then update memcached.php with your settings.

codeigniter-session-memcached's People

Contributors

dennisvdvliet avatar killgt avatar pierskarsenbarg avatar williamn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

codeigniter-session-memcached's Issues

MemcachePool::replace(): The lowest two bytes of the flags array is reserved for pecl/memcache internal use

Noticed this error:

Severity: Warning

Message: MemcachePool::replace(): The lowest two bytes of the flags array is reserved for pecl/memcache internal use

Filename: libraries/MY_Session.php

Line Number: 322

Either need to use the memcached server by changing
$this->memcached = new Memcache();
to
$this->memcached = new Memcached();
on line 97

Or add the compression flag as a third paramer i.e. MEMCACHE_COMPRESSED on lines
322 and 365 in MY_Session.php

session expires randomly after 5-10 mins

I am using this for my website, normally it would work fine , but after 5-10 mins randomly it would expire the session. I have set session timeout value to 2 days but still then this happens

my current config

$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 1209600;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = FALSE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;

/*
Memcached Session Variables
--------------------------------------------------------------------------

|
|
| "session_storage" = where you will be storing your session data. Accepts "memcached", "database", "cookie"
| "memcache_ports" = the port that you will connect to memcache on
| "memcached_nodes" = array of IP addresses of Memcached nodes
|
|
*/
$config['session_storage'] = 'memcached';
$config ['memcached_port'] = '11211';
$config['memcached_nodes'] = array('127.0.0.1');

can u please help me to fix this issue? I cant get anything reason for this behaviur

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.