开发者

session variables lost between pages or use same variables

开发者 https://www.devze.com 2023-02-02 00:19 出处:网络
Yesterday I learn many thing from you, especially from Marc and my problem was solved ( session variables lost between pages or use same variables ).

Yesterday I learn many thing from you, especially from Marc and my problem was solved ( session variables lost between pages or use same variables ).

Bu开发者_开发知识库t now I continue asking: I don't want to use Session ID(session.use_trans_sid = 1) between pages. But also I don't want to use same session variables for different users at same application and also I don't want lost session variables between pages for same user.

Is it possible? If yes how? Thanks for everybody for any help. Best regards.

I have Wamp Server(2.2.11) with PHP(5.2.9.-2).

My php.ini's session settings at below:

[Session]
session.save_handler = files
session.save_path = "c:/wamp/tmp"
session.use_cookies = 0
;session.cookie_secure =
;session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 1000
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
session.hash_function = 0
session.hash_bits_per_character = 5
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

I solved this problem with setting different session_name at php script with using cookies.


By using session.use_cookie=1 it will geneerate different session id for each user.


The best way to do sessions is by using cookies.

session.use_cookies = 1

If you are finding that people are using other people's sessions (presumably by using a computer that hasn't been logged out), try setting a short cookie lifetime:

session.cookie_lifetime = 600 ; 10 minutes

If you are having a different issue, it would be helpful if you could give some more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消