[FX.php List] Very strange session variable problem
DC
dan.cynosure at dbmscan.com
Mon Feb 12 10:42:27 MST 2007
Just a late follow up to this thread...
I just debugged a similar problem and I didn't have the luxury of moving
to another server! ;-)
There seems to be a variable scoping "problem" (or just a difference) in
PHP 4.3.10 where SESSION variables that once had their own scope overlap
with local variables (and probably globals though i didn't test it).
i'll bet that this original issue described by Bob P. was a variable
collision and the change from one version of PHP to the other resolved
the problem because the SESSION variables got re-scoped properly.
just writin' what i've seen and worked through - no searching the PHP
bug database...
dan
Bob Patin had written:
> Well, here's how I resolved it:
>
> The entire set of PHP pages were on my client's web server, which is
> running PHP 4.3.10; until about the 12th, this was all working flawlessly.
>
> So just now I took all the PHP and moved it to my web server, which is
> runnign 4.4.4, and it immediately worked as it should.
>
> So as I think about it, I suspect that the client's web server had been
> altered (messed up) somehow so that session variables weren't being
> properly stored or referenced. Here's why that makes sense: I could set
> a session variable, then echo it back immediately using "echo
> $_SESSION['var']" and it would work; however, as soon as I went to a 2nd
> page and tried echoing it back again, it would fail.
>
> Anyway, all's well now; that's why I like working on my own web servers!
>
> 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
>
>
> On Feb 2, 2007, at 2:21 PM, Jon Montgomery wrote:
>
>> Bob,
>> My last post had an extra session_start() in it. Basically, did you
>> Post the session data on the second page. Then echo it to see if it made
>> the trip to the next page.
>>
>> Jon Montgomery
>> --Jon Montgomery, Band Director
>> Du Quoin Middle School Band
>> 845 East Jackson Street
>> Du Quoin, Illinois 62832
>>
>> Work Phone 618-542-2646 ext. 1133
>> Home Phone 618-542-2287
>> Work Email jwmontgomery at dqud300.perry.k12.il.us
>> Home Email vicepresident at onecliq.net
>>
>>
>>
>> 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