By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,186 Members | 1,620 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,186 IT Pros & Developers. It's quick & easy.

Session errors

P: n/a
Hi! I've got a Php 4.3.3 installation on A Red Hat Advanced Server 2.1.

Sessions start correctly if i start them from the server root.
But, if i start the session on a sub-folder, when i change to a folder
that's not below it, the session gets started again.

Let's see an example

When i begin from the document root all goes as expected...
Open /index.php -> session id = A
Open /folder1/index.php -> session id = A
Open /folder2/index.php -> session id = A

But when i begin on a subfolder.......
Open /folder1/index.php -> session id = A
Open /folder1/index2.php -> session id = A (inside the same folder the
session is mantained)
Open /folder1/subfolder/index.php -> session id = A (on a sub-folder the
session is also mantained)
Open /folder2/index.php -> session id = B (on a folder that's not below
the first, the session starts again!!!!!!!!)
Open /folder3/index.php -> session id = C

It's like if the session were only set for the current path and downwards,
but not the entire server...
Any thoughts???

TIA,
Alex.

--
Reply to abazan at filnet dot es
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Alex Bazan" <me@privacy.net> wrote in message
news:bl************@ID-106105.news.uni-berlin.de...
Hi! I've got a Php 4.3.3 installation on A Red Hat Advanced Server 2.1.

Sessions start correctly if i start them from the server root.
But, if i start the session on a sub-folder, when i change to a folder
that's not below it, the session gets started again.

Let's see an example

When i begin from the document root all goes as expected...
Open /index.php -> session id = A
Open /folder1/index.php -> session id = A
Open /folder2/index.php -> session id = A

But when i begin on a subfolder.......
Open /folder1/index.php -> session id = A
Open /folder1/index2.php -> session id = A (inside the same folder the
session is mantained)
Open /folder1/subfolder/index.php -> session id = A (on a sub-folder the
session is also mantained)
Open /folder2/index.php -> session id = B (on a folder that's not below the first, the session starts again!!!!!!!!)
Open /folder3/index.php -> session id = C

It's like if the session were only set for the current path and downwards,
but not the entire server...
Any thoughts???


Any modifications to save_path, save_handler, cookie_path, gc_maxlifetime,
etc?

- Virgil
Jul 17 '05 #2

P: n/a
>
Any modifications to save_path, save_handler, cookie_path, gc_maxlifetime,
etc?


Session.cookie_path was not set. Now works correctly.
Is it not set by default now???? ... Strange as the problem came after the
php 4.3.3 update.

--
Reply to abazan at filnet dot es
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.