Welcome Guest, Not a member yet? Register   Sign In
Using files session handler, getting error for memcache
#1

Just switched to php 7.1 and started getting an error:
   Message: session_start(): Cannot find save handler 'memcache' - session startup failed
   Filename: Session/Session.php 
   Line Number: 143

This happens when running the second line in the following, in _construct() of the controller:
        $this->load->database();
        $this->load->library(array('session','user_agent','form_validation'));


This is what I have in application/config/config.php:
    $config['sess_driver'] = 'database';

    $config['sess_save_path'] = 'ci_sessions';

    $config['sess_cookie_name'] = 'ih_sss';

    $config['sess_expiration'] = 1800;

    $config['sess_match_ip'] = FALSE;

    $config['sess_time_to_update'] = 300;
   $config['sess_regenerate_destroy'] = FALSE; 

Any help to try to sort this out would be much appreciated. 
Thanks.
Reply
#2

Er, you say you are using *files* sessions, but your config says *database* sessions, and you are getting a *memcache* error? Something doesn't make sense here Undecided
Reply
#3

Sorry for the mistake: it is database!
Any suggestions?
Reply
#4

Just found that this is what there is in the / directory, in php.ini:

extension=memcached.so
extension=memcache.so 
...
session.save_handler = memcache
session.save_path = "tcp://10.168.1.55:11211?persistent=0&weight=1&timeo

The date on php.ini is 25/7/2017, a year before I changed to php 7.1, and it did not have any effect when running php 5.6.

Could this be it? Php overriding the setting in CI config.sys?
Reply
#5

YES, that was it.
When removing php.ini, everything works ok.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB