PHP session_id() every time is different after refrech page

Posted on 2008-06-15
Last Modified: 2012-08-13
I have problem ,PHP session_id() every time is different ,when i reload or go to other page,I need that it be same when user are login to site. Please help me? What can be. servers session configuration standartic.
Thang you.Waiting your answers
Question by:domka
  • 3
  • 2
LVL 142

Accepted Solution

Guy Hengel [angelIII / a3] earned 500 total points
ID: 21788431
do you call session_start() before calling session_id()?

Expert Comment

ID: 21788435
in your php.ini

check the following settings and makesure you have your /tmp directory correctly setup

session.save_handler = files
session.save_path = /tmp

also check

session.cookie_secure = false

Author Comment

ID: 21788451
   echo session_id();
yes i uses session_start
server configuration
session.save_handler =files
session.save_path = C:\WINDOWS\Temp
session.cookie_secure =Off
evethink is alright in configuration.
but  PHP session_id() every time is different ,when i reload or go to other page :(

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21788464
so I assume you closed the question wrongly/prematurely?


Expert Comment

ID: 21788499
you say it does'nt work and accept the answer. If you did it by mistake, open another as there may be an answer to this.
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 21788505
>If you did it by mistake, open another as there may be an answer to this.
actually, in that case I will reopen the question!
please tell us...

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now