Page 1 of 1

session problem

Posted: Thu Dec 11, 2008 6:18 pm
by NoorAdiga
Hey folk ... hope u r all doin' good ;)

my problem is about sessions in php5
I'm having 2 windows XP (Operating systems) on drive C and D
The session work correctly on the first windows, but while trying (the same script) on the other windows I get the following detailed problem:

1. the session is created at the first page and I can echo it ...

Code: Select all

<?php
session_start();
$_SESSION['hi']= "Hello!";
echo "The session hi contain ".$_SESSION['hi'];
?>
and I see it in the folder I save sessions in (I knew it bcz I empty the file before running the script and after that I got one new file)

2. when I check for that session I created from another page it says its unset and return nothing ....

Code: Select all

<?php
session_start();
if (isset($_SESSION['hi']))
echo "set !";
if (!isset($_SESSION['hi']))
echo "not set !";
echo $_SESSION['hi'];
?>
The same script run on the first windows xp but not the second one hmm but I need to run it on the second Windows operating system bcz my database is there and my new project use data base

any suggestions ?!? is there anything I can do in the setting to use session on windows ?!
please help :cry:

Re: session problem

Posted: Fri Dec 12, 2008 1:14 am
by anoopsn
I think you have no permission to create a new session.
Find the "session.save_path" variable in PHP.ini file and edit this