|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-15 17:40 UTC] JeanFrederic at Loiseau dot org
[2002-12-15 20:26 UTC] sniper@php.net
[2002-12-15 21:53 UTC] msopacua@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 22:00:02 2025 UTC |
Hi there, I've tried to make Sessions work with Php 4.2.3 and Apache 1.3.24 on Windows XP. NO WAY 1st try : --------- session_start(); if (!isset($_SESSION['compteur'])) { $_SESSION['compteur']=0; }else { $_SESSION['compteur']++; } echo $_SESSION['compteur']; -> after severals 'refresh', compteur stay at 0 ! 2nd try : --------- session_start(); if (isset($HTTP_SESSION_VARS['compteur'])) { $HTTP_SESSION_VARS['compteur']++; } else { $HTTP_SESSION_VARS['compteur'] = 0; } echo $HTTP_SESSION_VARS['compteur']; -> after severals 'refresh', compteur stay at 0 ! 3rd try : --------- if (!session_is_registered('compteur')) { session_register("compteur"); $compteur = 0; } else { $compteur++; } echo $compteur; -> after severals 'refresh', compteur stay at 0 ! 4th try : --------- if (!session_is_registered('compteur')) { session_register("compteur"); $compteur = 0; } else { $compteur++; } echo $compteur."<br>"; echo "<A HREF=\"test.php?SID\">click here</A>."; -> after severals 'refresh', compteur stay at 0 ! BUT SessionID is correctly transfered page after page... ---------- CONCLUSION ----------- No way to make it works... even with basic samples, what the way I choose. WHAT IS STRANGE : no Session files written in /tmp as it should be ! Hereafter my Phpinfo() for session : ------------------------------------ Session Support enabled session.auto_start = Off session.cache_expire = 180 session.cache_limiter = nocache session.cookie_domain = no value session.cookie_lifetime = 0 session.cookie_path = /tmp session.cookie_secure = Off session.entropy_file = no value session.entropy_length = 0 session.gc_maxlifetime = 1440 session.gc_probability = 1 session.name = PHPSESSID session.referer_check = no value session.save_handler = files session.save_path = /tmp session.serialize_handler = php session.use_cookies = On session.use_trans_sid = 1 Any idea on this bug ??? Regards, Jean-Frederic