Topic
1 reply Latest Post - ‏2004-09-12T23:12:19Z by SystemAdmin
SystemAdmin
SystemAdmin
232 Posts
ACCEPTED ANSWER

Pinned topic PHP sessions/os390

‏2004-08-05T19:48:56Z |
I'm having trouble retrieving session data.
>The approved/correct method of registering variables in a PHP/Apache session is: $_SESSION="Hello World";
>Once registered, this assigned variable/value should be retrievable from a browser by calling.. echo or print $_SESSIONabc ...displaying "Hello World."
>The value should be accessible across multiple pages using the same session.
>I have SuSe/Apache/PHP running on an x686 at home and can perform these actions across multiple browser pages without difficulty. The exact same code/actions will run on OS390 but only on the initial page from which they are called. On OS390 the session values cannot be retrieved when opening new browser pages. This only fails on the 390.
>I verified that the session data was being written to the server {Found in the "/tmp" folder)
>I verified the browser pages were calling the same session name and id
>I validated the code used to make the calls
>I verified all PHP settings in the "/etc/php.ini" file.

I'm including code (page.php and page2.php) that uses functions for registering values, naming & verifying sessions, and retrieves session data.

Any ideas on why a virtual environment might cause these functions not to work? ...or... Possible missing modules to enable same.

Page One
++++++++
<?php
session_name("website");
session_start();
$_SESSION="Cool Man";
print session_encode();
echo "<br>";
echo "This is page one";

echo "<br>";

echo "$_SESSIONabc";

echo "<br>";

echo session_name();

echo "<br>";

print session_save_path();
echo "<br>";

echo "<a href='page2.php'>next page</a>";
echo "<br>";
echo "<a href='page2.php?<?=SID ?>'>page2.php"

?>

+++++++++++++++++

Page Two
+++++++++

<?php
session_name("website");
session_start();

echo "This is page two.";

echo "<br>";

print "$_SESSIONabc";

echo "<br>";

echo session_name();

//get sess id

echo "<br>";

print session_encode();

echo "<br>";

$PHPSESSID=session_id();

echo "$PHPSESSID";

?>
Updated on 2004-09-12T23:12:19Z at 2004-09-12T23:12:19Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    232 Posts
    ACCEPTED ANSWER

    Re: PHP sessions/os390

    ‏2004-09-12T23:12:19Z  in response to SystemAdmin
    Did you solve your problem?
    I also have the same problem with s390.
    If you have any answers for this, plase let me know.