Posted: Sat Apr 08, 2006 6:38 pm
OK. Thanks for clearing it all up for me on session id. I don't use it much (can you tell?). I usually use DB sessions.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
PHP Version: 4.3.2-RC2
PHP OS: WINNT
Error Reporting: 2047 (E_ALL)
Register Globals: On
Short Tags: On
Display Errors: OffCode: Select all
ROB is the value set for "test".
Our current session id is 00e6b5525f41a6b04e0dbcfcea719526
Try the testCode: Select all
is the value set for "test".
Our current session id is 00e6b5525f41a6b04e0dbcfcea719526Code: Select all
<?php
foreach ($_SESSION as $key => $value)
{
echo $key . ' is the session key and ' . $value . ' is its value.<br />';
}
?>Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Here is my code exactly as it is in the files, the 2nd page displays nothing just a white screen......
1:Code: Select all
<?php
session_start();
$_SESSION['test1']="ROB";
$_SESSION['test2']="ROB";
$_SESSION['test3']="ROB";
$_SESSION['test4']="ROB";
$_SESSION['test5']="ROB";
$_SESSION['test6']="ROB";
echo $_SESSION['test1'] . ' is the value set for "test1".<br />';
echo $_SESSION['test2'] . ' is the value set for "test2".<br />';
echo $_SESSION['test3'] . ' is the value set for "test3".<br />';
echo $_SESSION['test4'] . ' is the value set for "test4".<br />';
echo $_SESSION['test5'] . ' is the value set for "test5".<br />';
echo $_SESSION['test6'] . ' is the value set for "test6".<br />';
echo 'Our current session id is ' . session_id() . '<br />';
echo '<a href="test2.php">Try the test</a>';
?>Code: Select all
<?php
session_start();
foreach ($_SESSION as $key => $value)
{
echo $key . ' is the session key and ' . $value . ' is its value.<br />';
}
?>Code: Select all
andCode: Select all
tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
<?php
ini_set('error_reporting', E_ALL);
session_start();
foreach ($_SESSION as $key => $value)
{
echo $key . ' is the session key and ' . $value . ' is its value.<br />';
}
?>Code: Select all
[Wed Apr 12 08:46:44 2006] [error] PHP Warning: session_start(): open(/tmp\sess_d509fff503b0bca31d6d115b91e81725, O_RDWR) failed: No such file or directory (2) in d:\software\apache\htdocs\first4glass\test1.php on line 2
[Wed Apr 12 08:46:44 2006] [error] PHP Warning: Unknown(): open(/tmp\sess_d509fff503b0bca31d6d115b91e81725, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
[Wed Apr 12 08:46:44 2006] [error] PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0