Re: losing session values [SOLVED]

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

 



hi guys,

solved the problem. it was the register_globals setting in the php.ini
file.

made a .htacess file and set it to off; works 100%

also made all redirects like this:

            session_write_close();
            header("Location: buddyList.php");
            exit();


note the             session_write_close();  and         exit(); statements

If you do not write out the session before redirecting the browser,
there is
a chance that the second page will start up, and read in the session
record,
before the first page has finished shutting down and writing the session
record, causing lost session data.

So i hope this can help others who have the same problem as i've just had!!

Angelo



Angelo Zanetti wrote:

>Hi all,
>
>We have developed a site on a server now the client has moved the site
>to another server. Both servers run apache. However some of the Session
>variables are losing their values or their values are getting changed.
>
>We have a number of header("location: xxx.php");
>and they have the exit(); function after each statement but we are not
>sure whats causing the session problem. we also have a few javascript
>popup windows, is there anything that people can tell me from experience
>that might be causing these session variables to be altered??
>
>thanks in advance
>
>Angelo
>
>  
>

-- 
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