ID: 16273
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Duplicate
+Status: Closed
Bug Type: Session related
Operating System: Windows 98 SE German
PHP Version: 4.1.2
New Comment:
This bug has been fixed in CVS.
Previous Comments:
------------------------------------------------------------------------
[2002-03-25 20:15:36] [EMAIL PROTECTED]
Two days ago I installed PHP Version 4.1.2 as CGI on a Win98SE
platform
with Apache 1.3.20 running as server. I used the
php.ini-recommended
with register_globals turned OFF and made only minor changes
concerning
directories and error-display. Migrating my old scripts to the new
settings I found that the session management with the superglobal
$_SESSION would not work: the session file was created in my
session
directory (session.save_path=c:\tmp) BUT no session variables were
stored in it.
Here's a pair of scripts to illustrate:
session_1.php:
<?php
session_start();
$_SESSION['text']="Hallo!";
echo '<a href="session_2.php">session_2.php</a>';
?>
session_2.php:
<?php
session_start();
echo $_SESSION['text'];
?>
On activating the link to session_2.php, the following errormessage
is
displayed:
Warning: Undefined index: text in session_2.php on line 3
(Using $HTTP_SESSION_VARS['text'] instead of $_SESSION['text'] leads
to
the same result.)
However, turning register_globals ON and using global variables
with
session_register(), session_unregister() and
session_is_registered()
works fine. But that's not really the point of php.ini-recommended,
is
it? ;-)-:
After spending many hours checking my setup, reading the manual and
several faqs and finally receiving feedback from other users who
have
the same problem on the german PHP-mailinglist [EMAIL PROTECTED] and
not
finding it this bug in your list of reported bugs, I decided to
report
it. I also thought that this is a rather major problem, since
register_globals is to be turned off by default in upcoming
versions.
Please contact me if you need any additional information - this is
the
first time I am reporting a bug.
Thanx 4 your great work,
Robert
------------------------------------------------------------------------
[2002-03-25 19:53:51] [EMAIL PROTECTED]
Two days ago I installed PHP Version 4.1.2 as CGI on a Win98SE platform
with Apache 1.3.20 running as server. I used the php.ini-recommended
with register_globals turned OFF and made only minor changes concerning
directories and error-display. Migrating my old scripts to the new
settings I found that the session management with the superglobal
$_SESSION would not work: the session file was created in my session
directory (session.save_path=c:\tmp) BUT no session variables were
stored in it.
Here's a pair of scripts to illustrate:
session_1.php:
<?php
session_start();
$_SESSION['text']="Hallo!";
echo '<a href="session_2.php">session_2.php</a>';
?>
session_2.php:
<?php
session_start();
echo $_SESSION['text'];
?>
On activating the link to session_2.php, the following errormessage is
displayed:
Warning: Undefined index: text in session_2.php on line 3
(Using $HTTP_SESSION_VARS['text'] instead of $_SESSION['text'] leads to
the same result.)
However, turning register_globals ON and using global variables with
session_register(), session_unregister() and session_is_registered()
works fine. But that's not really the point of php.ini-recommended, is
it? ;-)-:
After spending many hours checking my setup, reading the manual and
several faqs and finally receiving feedback from other users who have
the same problem on the german PHP-mailinglist [EMAIL PROTECTED] and not
finding it this bug in your list of reported bugs, I decided to report
it. I also thought that this is a rather major problem, since
register_globals is to be turned off by default in upcoming versions.
Please contact me if you need any additional information - this is the
first time I am reporting a bug.
Thanx 4 your great work,
Robert
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16273&edit=1