session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_divisor = 1000 session.g c_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 = 0 session.hash_function = 0 session.hash_bits_per_character = 5 如何修复新主机以保持其会话ID不变? 对不起英语不好。 TIAHi, I''m new member of this group.I had added new virtual host at my intranet server. The new virtualhost configuration on httpd.conf is similar with the old one.At the new virtual host, the session id seems changed everyinteraction to server (new page or reload).The old one is fine, the session id keeps at the same string.Both are at the same server.I use Apache 2.2.3 (Win32) with PHP 5.2.0.Tested using code below:session_start();echo session_id();PHP Configuration :session.save_handler = files;session.save_path = "/tmp"session.use_cookies = 1;session.use_only_cookies = 1session.name = PHPSESSIDsession.auto_start = 0session.cookie_lifetime = 0session.cookie_path = /session.cookie_domain =session.serialize_handler = phpsession.gc_probability = 1session.gc_divisor = 1000session.gc_maxlifetime = 1440session.bug_compat_42 = 0session.bug_compat_warn = 1session.referer_check =session.entropy_length = 0session.entropy_file =;session.entropy_length = 16;session.entropy_file = /dev/urandomsession.cache_limiter = nocachesession.cache_expire = 180session.use_trans_sid = 0session.hash_function = 0session.hash_bits_per_character = 5How to fix the new host to keep its session id unchanged?Sorry for the bad english.TIA推荐答案 Bocah Sableng写道:Bocah Sableng wrote: 我是这个小组的新成员。 我在我的内联网服务器上添加了新的虚拟主机。 httpd.conf上新的虚拟 主机配置与旧的相似。 在新的虚拟主机上,会话ID似乎每次都改变了 与服务器的交互(新页面或重新加载)。 旧的很好,会话ID保持相同的字符串。 两者都在同一台服务器上。 我使用Apache 2.2.3(Win32)和PHP 5.2.0。 使用以下代码进行测试: session_start( ); echo session_id(); PHP配置: session.save_handler = files ; session.save_path =" / tmp" session.use_cookies = 1 ; session.use_only_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session。 cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_divisor = 1000 sess ion.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 = 0 session.hash_function = 0 session.hash_bits_per_character = 5 如何修复新主机以保持会话ID不变? 对不起糟糕的英语。 TIAHi, I''m new member of this group.I had added new virtual host at my intranet server. The new virtualhost configuration on httpd.conf is similar with the old one.At the new virtual host, the session id seems changed everyinteraction to server (new page or reload).The old one is fine, the session id keeps at the same string.Both are at the same server.I use Apache 2.2.3 (Win32) with PHP 5.2.0.Tested using code below:session_start();echo session_id();PHP Configuration :session.save_handler = files;session.save_path = "/tmp"session.use_cookies = 1;session.use_only_cookies = 1session.name = PHPSESSIDsession.auto_start = 0session.cookie_lifetime = 0session.cookie_path = /session.cookie_domain =session.serialize_handler = phpsession.gc_probability = 1session.gc_divisor = 1000session.gc_maxlifetime = 1440session.bug_compat_42 = 0session.bug_compat_warn = 1session.referer_check =session.entropy_length = 0session.entropy_file =;session.entropy_length = 16;session.entropy_file = /dev/urandomsession.cache_limiter = nocachesession.cache_expire = 180session.use_trans_sid = 0session.hash_function = 0session.hash_bits_per_character = 5How to fix the new host to keep its session id unchanged?Sorry for the bad english.TIA 您的Apache错误日志中有什么(或者您的PHP错误在哪里) 被记录)? - ================== 删除x来自我的电子邮件地址 Jerry Stuckle JDS计算机培训公司 js ******* @ attglobal.net ==================What''s in your Apache error log (or where ever you have your PHP errorsbeing logged)?--==================Remove the "x" from my email addressJerry StuckleJDS Computer Training Corp. js*******@attglobal.net================== 4月9日下午7:52,Jerry Stuckle< jstuck ... @ attglobal.netwrote:On Apr 9, 7:52 pm, Jerry Stuckle <[email protected]: > 您的Apache错误日志中有什么(或者您的PHP错误在哪里? 被记录)?>What''s in your Apache error log (or where ever you have your PHP errorsbeing logged)? 感谢您的回复。 我的Apache错误日志中没有任何行显示任何错误,并且未记录 PHP错误。 之前发布的php代码似乎正常执行。这是我的Apache访问日志中的一个剪辑 (并重复几次): 192.168.1.90 - - [09 / Apr / 2007:11:54:17 + [0000]GET /session_id.php HTTP / 1.1 200 330 我不知道会话ID生成的机制。 ''当我移动 顶部的新虚拟主机并使用其本地IP 地址(192.168.1.90)访问时,问题就消失了。但是当使用命名的vhost访问 时(即使顶部有新的vhost配置), 问题仍然存在。 我应该发布vhost配置? (这个组是php新闻组) 和另一个信息: 我使用''register_globals = on''以及''register_long_arrays = on'' 向后兼容我的古代脚本。我知道这很糟糕 的习惯,但我使用的应用程序和服务器都只用于内网应用 而我没有太多时间来解决所有问题。 谢谢。Thanks for you response.There''s no line indicating any error on my Apache error log, and thePHP errors are not logged.The php code I posted before seems normally executed. Here is a snipfrom my Apache access log (and repeated several times) :192.168.1.90 - - [09/Apr/2007:11:54:17 +0700] "GET /session_id.phpHTTP/1.1" 200 330I don''t know the mechanisms of session id generation. ''Cos when I movethe new virtual host at the top and accessed using its local IPaddress (192.168.1.90), the problem disappears. But when accessedusing named vhost (even if the new vhost config at the top), theproblem still remain.Should I post the vhost config? (This group is php newsgroup)And another info:I use ''register_globals=on'' and also ''register_long_arrays=on'' forbackward compatibility with my ancient scripts. I know it''s a badhabit, but I use the application and the server both for intranet apponly and I don''t have much time to fix all.Thanks. 4月9日下午7:54,Bocah Sableng < cahsabl ... @ gmail.comwrote: [...]On Apr 9, 7:54 pm, "Bocah Sableng" <[email protected]:[...] 另一个信息:And another info: 我在 http://bugs.php.net/bug.php?id=16263 。 但我不认为这是同样的问题。I found Bug #16263 on http://bugs.php.net/bug.php?id=16263.But I don''t think it''s the same problem. 这篇关于每次更改会话ID转到新页面或重新加载。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-03 18:34