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

Of course...

if $_SESSION['toto'] is 0 then

if (!$_SESSION['toto']) $_SESSION['toto'] = 0
will evaluate to:

if (!0) $_SESSION['toto'] = 0;
which is:

if (TRUE) $_SESSION['toto'] = 0;

so it will always reset the session variable to 0.

Not a bug -> bogus



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

[2002-12-19 03:41:55] [EMAIL PROTECTED]

I have added 

echo "click <a href=\"test.php?".SID."\">here</a>";

in order to try to pass info in URL in case of cookie issue, and SID
return... nothing... but !

echo "sessionid = ".session_id()."<br>";
echo "sessionid = ".session_name()."<br>";

return correct session id and correct session name !

So in order to replace the not working SID, I put

echo "click <a
href=\"test.php?".session_name()."=".session_id()."\">here</a>";

Now the URL is showing the correct information, but still not working
for $_SESSION['toto'].

Jean-Frederic

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

[2002-12-19 03:26:50] [EMAIL PROTECTED]

I'm just wondering, why this code is not working

<?php

echo session_start();

if (!$_SESSION['toto']) $_SESSION['toto']=0;
else $_SESSION['toto']++;

echo "Toto = ".$_SESSION['toto'];

?>

under Windows XP + Php 4.2.3 + Apache 1.3.24

session_start() return TRUE, and the session file is created with the
correct content, but this content stay at value 0 for 'toto' between
pages.

I have tried the same thing under linux... same issue...

Php Config :
------------

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 / 
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:\winxp\temp
session.serialize_handler php
session.use_cookies On
session.use_trans_sid 0

Regards,

Jean-Frederic


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


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

Reply via email to