ErrorException: 警告: ini_set(): 会话处于活动状态.您此时无法在/../../中更改会话模块的 ini 设置 [英] ErrorException: Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /../../

查看:35
本文介绍了ErrorException: 警告: ini_set(): 会话处于活动状态.您此时无法在/../../中更改会话模块的 ini 设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建自己的身份验证提供程序,例如 http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html.

I am trying to create my own authentication provider like in http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html.

但是,它一直在说:

ErrorException:警告:ini_set():会话处于活动状态.您此时无法在/../../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php line 56

ErrorException: Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /../../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php line 56

推荐答案

Symfony2 会话在启用会话自动启动"时将无法正常工作.所以请确保它已禁用.

Symfony2 sessions will not work properly with "session auto start" enabled. So make sure that's disabled.

确保您的 php 配置 php.ini 已配置:session.auto_start = 0.

Make sure your php configuration php.ini has this configured: session.auto_start = 0.

或者,如果您无法编辑 php.ini 文件,您可以将 php_flag session.auto_start 0 添加到您的 .htaccess 文件中.

Or you can add php_flag session.auto_start 0 to your .htaccess file if you can not edit the php.ini file.

这篇关于ErrorException: 警告: ini_set(): 会话处于活动状态.您此时无法在/../../中更改会话模块的 ini 设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆