Re: Weird sessions problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 29 November 2004 06:46, steve wrote:

> No to both. When I arrive at the new page, the sessions vars (as expected)
> contain the values set by the previous page. $ref_page is not set. The
> values are transferred to $ref_page by the function. That works as planned.
> I then reset the value of the session vars, at which point, $ref_page also
> gets set. From printing out the values after each line, I find this:
>
> Let's say we've come from the page /community.php and have arrived
> at /market.php. Here are the values at each stage:
>
>             $_SESSION['ref_page] = '/community.php'
>             $_SESSION['ref_pagequery'] = 'pagemode=index' // as an example
> 53. $ref_page = get_ref_page();
>             $ref_page['name'] =  '/community.php'
>             $ref_page['query'] = 'pagemode=index'
>             $_SESSION['ref_page] = '/community.php'
>             $_SESSION['ref_pagequery'] = 'pagemode=index'
> 54. $_SESSION['ref_page'] = THIS_PAGE;
>             $ref_page =  '/community.php' // now a scalar
>             $_SESSION['ref_page] = '/market.php'
>
> register_globals is off (in php.ini and there are no .htaccess files).

The only thing that I can think of that will cause such behaviour (that is 
setting $_SESSION['xyz'] will change $xyz) is the register_globals setting 
being enabled. If you're certain that this is not the case I suggest that you 
post some *concise* code that illustrates the problem so that others can test 
whether they can reproduce what you're seeing.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Besides, I think Slackware sounds better than 'Microsoft,' don't you?
 -- Patrick Volkerding
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux