Connecting Tech Pros Worldwide Help | Site Map

Session value in include

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 08:41 AM
BlueFrog
Guest
 
Posts: n/a
Default Session value in include

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



  #2  
Old July 17th, 2005, 08:41 AM
Alvaro G Vicario
Guest
 
Posts: n/a
Default Re: Session value in include

*** BlueFrog wrote/escribió (Mon, 20 Sep 2004 07:29:00 +0100):[color=blue]
> 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![/color]

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
--
  #3  
Old July 17th, 2005, 08:41 AM
BlueFrog
Guest
 
Posts: n/a
Default Re: Session value in include

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" <alvaro_QUITAR_REMOVE@telecomputeronline.com> wrote in
message news:1qez4kvdfyvnq.15hyvni98tgev$.dlg@40tude.net.. .[color=blue]
> *** BlueFrog wrote/escribió (Mon, 20 Sep 2004 07:29:00 +0100):[color=green]
>> 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![/color]
>
> 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
> --[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.