简体   繁体   中英

Error on session_start

I get the following error within my code:

Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /var/www/worldofthegods/data/www/worldofthegods.com/public/armory/engine/classes/sessions.none.php on line 22

and it's talking about this:

protected function _start()
{
  global $config;

    session_name($config['AuthCookieName'].'_hash');

    session_start();

    return true;
}

Maybe u guys can help me out since I can't find the error.

Kind Regards, Mikey Romkes

Try this:

In your php.ini set session.gc_probability to 0

It is caused due to automatic session garbage collection. Disable it and you are on.

In Debian and Ubuntu, /var/lib/php5 , where the session data is stored, has permissions of drwx-wx-wt and should only be cleaned by a cron script. So, the package maintainers disable automatic session garbage collection.

But, other php5 packages (like php5-cli) don't have garbage collection disabled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM