Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ErrorException: Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /../../

Tags:

symfony

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

But, it keeps saying:

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

like image 916
Sukhrob Avatar asked Nov 17 '25 12:11

Sukhrob


1 Answers

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

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

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

like image 181
lifo Avatar answered Nov 20 '25 04:11

lifo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!