Jump to content

what does this mean and how they work, what about security after applying them on the page


Recommended Posts

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 by mahenda

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.

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

 

 

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.

  • Haha 3

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.