Welcome Guest, Not a member yet? Register   Sign In
Fatal Error session_start()
#1

Hi all,

First post here as i'm trying to migrate my original Codeigniter installation over to a new server and i'm getting the following errors now unforunately:

Code:
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: memcache (path: /var/sites/v/mysite/public_html/sess) in /var/sites/v/mysite/public_html/application/libraries/Session.php on line 113

I've been into libraries/session.php and line 113 is just the call for 'session_start()'

Code:
session_set_cookie_params($this->_config['sess_expire_on_close'] ? 0 : $expire, $path, $domain, $secure, $http_only);

        if ( ! isset($_SESSION)) {
            session_start();
        }

        if (isset($_SESSION[$this->sess_namespace]) ) {
            $this->store = $_SESSION[$this->sess_namespace];
        }

Any help would be much appreciated.
Reply
#2

In application/config/config.phh check your $config['cookie_path'] var.

Reply
#3

CI 2.x doesn't use PHP's session functions.
CI3.0-dev doesn't even have a libraries/Session.php file, nor any code similar to the one that you're showing.

So, in any case, whatever the issue is - it's not caused by CI. The error message that you're showing however, does hint at your session.save_handler being set to 'memcache', so that might help you debug your code.
Reply
#4

Yeah that code looks like some kind of custom-written library or something that is trying to use memcache. Your new server (is this a new server?) may not even have memcache installed. I suspect this would be some kind of setting you can find in your code like Narf says. It would be downright silly for some kind of php.ini setting to try and use memcache for sessions if memcache wasn't installed?
Reply
#5

I have the same problem. What did you end up doing? Thanks!
Reply
#6

I think you are missing set encrytion key on config.php file that will be as

$config['encryption_key'] = 'sds#@%sdsdd';

You can place any random string instead of this sds#@%sdsdd

You can follow below link to set up your codeigniter application

Set up Codeigniter
Reply




Theme © iAndrew 2016 - Forum software by © MyBB