CodeIgniter Forums
Using files session handler, getting error for memcache - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: Using files session handler, getting error for memcache (/showthread.php?tid=71235)



Using files session handler, getting error for memcache - uhaile - 07-22-2018

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.


RE: Using files session handler, getting error for memcache - ciadmin - 07-22-2018

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


RE: Using files session handler, getting error for memcache - uhaile - 07-22-2018

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


RE: Using files session handler, getting error for memcache - uhaile - 07-22-2018

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?


RE: Using files session handler, getting error for memcache - uhaile - 07-23-2018

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