Reply to Re: [PHP] losing session values [SOLVED]

Your name:

Reply:


Posted by Angelo Zanetti on 05/04/05 19:19

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация