[FX.php List] Very strange session variable problem
Tom Sepper
tsepper at dctandt.com
Fri Feb 2 13:21:56 MST 2007
Where's your session_start(); in relation to your headers? I seem to
remember that session_start() should be before any header information.
---
Tom Sepper
Director of Information Technology
Director's Choice Tour & Travel
P 806.762.6354
F 806.763.7637
tsepper at dctandt.com
http://www.directorschoicetourandtravel.com
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Friday, February 02, 2007 2:19 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Very strange session variable problem
No, I didn't include the FX pages because they weren't referenced on
those pages.
When I did a simple set and retrieve I did see my session variable.
I still don't know why it's not working properly; I'm using a META
tag to redirect the user to another page, and I wonder if somehow
it's messing things up. Here's what I'm doing:
on page 1, I'm setting the variable, then using a META tag to go to a
2nd page.
On page 2, $_SESSION doesn't retrieve the variable, although I can
retrieve it on page 1 using the exact same $_SESSION call.
The pages are on a machine running PHP 4.3.10; i use 4.4.4 on my web
server; I wonder if this is something to do with the web server these
pages are hosted on (it's not one of mine).
Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
CONTACT US VIA INSTANT MESSAGING:
AIM or iChat: longterm1954
Yahoo: longterm_solutions
MSN: tech at longtermsolutions.com
ICQ: 159333060
On Feb 2, 2007, at 1:09 PM, Jon Montgomery wrote:
> Bob,
> Not sure if this is what you mean, but did you do this:
>
> session_start();
>
> session_start();
> include_once('FX/FX.php');
>
> nclude_once('/FX/server_data.php');
>
>
> $_SESSION['myvar'];
>
>
>
> Then do:
> .echo_$_SESSION['myvar'];
>
> Jon Montgomery
> --
> Jon Montgomery
> Home phone: 618.542.2287
> School phone: 618.542.2646 ext, 1133
> Cell phone: 618.201.7388
> Home email: vicepresident at onecliq.net
> School email: jwmontgomery at dqud300.perry.k12.il.us
>
>
>
> On 2/2/07 12:54 PM, "Bob Patin" <bob at patin.com> wrote:
>
>> Hi,
>>
>> Hopefully someone can help me with this:
>>
>> I set my session variable on page 1 (yes, I do have "session_start()"
>> at the top of the page.
>>
>> On page 2, I try to echo it with this:
>>
>> session_start();
>> echo $_SESSION['myvar'];
>>
>> and nothing appears. I know I'm setting the variable, because on page
>> 1 I echo the session variable and it does show that I did set it.
>>
>> Anyone ever seen something like this before?
>>
>> Thanks,
>>
>> Bob Patin
>> Longterm Solutions
>> bob at longtermsolutions.com
>> 615-333-6858
>> http://www.longtermsolutions.com
>>
>> CONTACT US VIA INSTANT MESSAGING:
>> AIM or iChat: longterm1954
>> Yahoo: longterm_solutions
>> MSN: tech at longtermsolutions.com
>> ICQ: 159333060
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list