pierskarsenbarg / codeigniter-session-memcached Goto Github PK
View Code? Open in Web Editor NEWUpdate to the session library to use memcached instead
Update to the session library to use memcached instead
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.
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.