session problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NoorAdiga
Forum Newbie
Posts: 5
Joined: Thu Dec 11, 2008 6:10 pm

session problem

Post 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:
anoopsn
Forum Newbie
Posts: 2
Joined: Fri Dec 12, 2008 12:55 am

Re: session problem

Post 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
Post Reply