Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7547585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:29:27+00:00 2026-05-30T09:29:27+00:00

When calling session_start() for the first time, a new session will be generated. Later,

  • 0

When calling session_start() for the first time, a new session will be generated. Later, when session_start is called again, the session will be resumed using the session id in the cookie (or from GET/POST request if session.use_trans_sid is turned on on the server) sent by the client.

For enhanced security, a new session id can be re-generated for the user from time to time, even when he/she has not logout/login again.

Does this behavior happen automatically, meaning that this is the default setting on most web servers? Or it requires manual coding?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:29:28+00:00Added an answer on May 30, 2026 at 9:29 am

    It does not happen automatically.

    You have to use session_regenerate_id().

    session_regenerate_id() will replace the current session id with a new
    one, and keep the current session information.

    It is a good practice that you change the session id at least every time the user’s privilege level changes (simplest example being when he logs in).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two PHP scripts, both using the same session by calling session_name('MySessID') .
Given an example of calling two web services methods from a session bean, what
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
I have a cookie which is generated from a servlet and that I would
I'm not calling session_start() and php.ini has session.auto_start = 0 . I can still
I have a PHP code which starts a session using session_start() . Well, after
I'm trying to preserve a session across an AJAX request. Simply calling session_start() is
Calling image = Image.open(data) image.thumbnail((36,36), Image.NEAREST) will maintain the aspect ratio. But I need
Calling Html.RenderPartial(~/Views/Payments/MyControl.ascx); from a view works if MyControl.ascx is a control that directly inherits
I'm using upstart v1.4 to start my application server, it's called unicorn . The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.