ID:               21031
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Session related
 Operating System: Windows XP
 PHP Version:      4.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2002-12-15 17:40:58] [EMAIL PROTECTED]

I've found that under Windows XP, if the session.save_path is '/tmp'
even if this directory exist... it will not work... is it a bug ?

But never mind, I put c:\windows\temp and it works

The problem now is close to bug #20170

here is the code

session_start();

if (!isset($_SESSION['maVariable'])) {
    $_SESSION['maVariable']=0;
}else{
    $_SESSION['maVariable']++;
}
echo $_SESSION['maVariable'];

Very simple no ? :-) But this is NOT working on my configuration (Php
4.2.3 + Apache 1.3.24 + Windows XP) unless I add

echo "<A HREF=\"test.php?SID\">click here</A>.";

So no way to get the variables values transfered if I do not give to
next page the Session ID...

Why ???????????? Is it a bug ?

Hereafter my php.ini config :

session.auto_start = Off 
session.cache_expire = 180
session.cache_limiter = nocache
session.cookie_domain = no value
session.cookie_lifetime = 0
session.cookie_path = c:\windows\temp
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 = c:\windows\temp
session.serialize_handler = php
session.use_cookies = On
session.use_trans_sid = 0

So I change session.cookie_path to session.cookie_path=/ 
and IT WORKS !!!!!

So is it a bug ?????

why /tmp which is an existing directory do not work for
session.save_path ?

why c:\windows\temp which is an existing directory WORKS for
session.save_path BUT NOT for session.cookie_path ?????

I just want to know if it's a bug or not... if not, I'm sorry for this
message, but I'm sure it will help some of you who could fall in the
trap...

Jean-Frederic (happy now after hours lost to search a workaround ;-))

------------------------------------------------------------------------

[2002-12-15 16:30:05] [EMAIL PROTECTED]

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21031&edit=1

Reply via email to