Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PHP session_id() every time is different after refrech page

Posted on 2008-06-15
6
Medium Priority
?
385 Views
Last Modified: 2012-08-13
Hello,
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
0
Comment
Question by:domka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1500 total points
ID: 21788431
do you call session_start() before calling session_id()?
0
 
LVL 4

Expert Comment

by:afzz
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
0
 

Author Comment

by:domka
ID: 21788451
session_start();
   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 :(

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 143

Expert Comment

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

0
 
LVL 4

Expert Comment

by:afzz
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.
0
 
LVL 143

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...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

719 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