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

Session value in include

P: n/a
Hi,

I am having a problem accessing a session value from an include file - I
echoed out session_id() from the include and it changes each time I navigate
from one page which includes the include to another. Why is this happening
as I'm pretty sure that's what is preventing me accessing my session. I'm
using cookie based sessions. This is driving me nuts - please help!

Blue Frog
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
*** BlueFrog wrote/escribió (Mon, 20 Sep 2004 07:29:00 +0100):
I am having a problem accessing a session value from an include file - I
echoed out session_id() from the include and it changes each time I navigate
from one page which includes the include to another. Why is this happening
as I'm pretty sure that's what is preventing me accessing my session. I'm
using cookie based sessions. This is driving me nuts - please help!


Including file is the same as pasting the code. The only thing I can think
of with all the incredible amount of info you provide :) is that you're
including a file through a web server:

include('http://........');

If the included code relies on sessions, this doesn't make much sense. It's
your webserver the one that opens the session, not the client browser. What
could be the purpose of that?
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Jul 17 '05 #2

P: n/a
Thanks a lot - that was the one thing that didn't occur to me and it was the
thing that should have.

Joe
"Alvaro G Vicario" <al******************@telecomputeronline.com> wrote in
message news:1q******************************@40tude.net.. .
*** BlueFrog wrote/escribió (Mon, 20 Sep 2004 07:29:00 +0100):
I am having a problem accessing a session value from an include file - I
echoed out session_id() from the include and it changes each time I
navigate
from one page which includes the include to another. Why is this
happening
as I'm pretty sure that's what is preventing me accessing my session.
I'm
using cookie based sessions. This is driving me nuts - please help!


Including file is the same as pasting the code. The only thing I can think
of with all the incredible amount of info you provide :) is that you're
including a file through a web server:

include('http://........');

If the included code relies on sessions, this doesn't make much sense.
It's
your webserver the one that opens the session, not the client browser.
What
could be the purpose of that?
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.