CakePHP Error: Unable to configure the session, setting session.auto_start failed

后端 未结 5 1976
再見小時候
再見小時候 2021-01-31 19:27

I\'m getting this error:

Error: [CakeSessionException] Unable to configure the session, setting session.auto_start failed.

I\'m using Cakephp 2.2.4.

5条回答
  •  情歌与酒
    2021-01-31 20:06

    Andriy Struk's answer is correct. He said: So you have 3 main options: upgrade CakePHP, downgrade PHP, or use standard PHP sessions.

    But there's a 4th option, you can simply comment out a single line in /lib/Cake/Model/Datasource/CakeSession.php (around line 557):

    // 'session.auto_start' => 0,
    

    That stops Cake calling ini_set() on that setting, and prevents the fatal error.

提交回复
热议问题