mahenda Posted April 5, 2021 Share Posted April 5, 2021 (edited) ini_set('session.cache_limiter','public'); session_cache_limiter(false); they give warning Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in C:\xampp\htdocs\aps\init.php on line 3 Warning: session_cache_limiter(): Cannot change cache limiter when session is active in C:\xampp\htdocs\aps\init.php on line 4 Edited April 5, 2021 by mahenda Quote Link to comment https://forums.phpfreaks.com/topic/312425-what-does-this-mean-and-how-they-work-what-about-security-after-applying-them-on-the-page/ Share on other sites More sharing options...
requinix Posted April 5, 2021 Share Posted April 5, 2021 As both error messages clearly state, you cannot change session settings after you've already started the session. It should logically follow that if you want to change settings then you have to do it before the session is started. Quote Link to comment https://forums.phpfreaks.com/topic/312425-what-does-this-mean-and-how-they-work-what-about-security-after-applying-them-on-the-page/#findComment-1585604 Share on other sites More sharing options...
mahenda Posted April 5, 2021 Author Share Posted April 5, 2021 7 minutes ago, requinix said: As both error messages clearly state, you cannot change session settings after you've already started the session. It should logically follow that if you want to change settings then you have to do it before the session is started. so this means ini_set('session.cache_limiter','public'); session_cache_limiter(false); session_start(); or session_start(); ini_set('session.cache_limiter','public'); session_cache_limiter(false); and what happen when am creating login session Quote Link to comment https://forums.phpfreaks.com/topic/312425-what-does-this-mean-and-how-they-work-what-about-security-after-applying-them-on-the-page/#findComment-1585605 Share on other sites More sharing options...
requinix Posted April 5, 2021 Share Posted April 5, 2021 One of those two will work and the other will not. 9 minutes ago, mahenda said: and what happen when am creating login session What will happen is, if you do the correct method then it will work, and if you do the incorrect method then it will not work. 3 Quote Link to comment https://forums.phpfreaks.com/topic/312425-what-does-this-mean-and-how-they-work-what-about-security-after-applying-them-on-the-page/#findComment-1585606 Share on other sites More sharing options...
MadTechie Posted April 11, 2021 Share Posted April 11, 2021 BUT if you use the incorrect method in the same execution as the correct method, then the success or lack of would be based on the order of execution and which may or may not be due the position of the code in the said file. Quote Link to comment https://forums.phpfreaks.com/topic/312425-what-does-this-mean-and-how-they-work-what-about-security-after-applying-them-on-the-page/#findComment-1585736 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.