[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Hi PHP's sessions are blocking, i.e. until a session is closed, all other calls to session_start() are pending. If you don't close a session explicitely, it remains opened until the script is terminated. The solution is to close a session as soon as possible (session_write_close) or use

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
Hello Tom I looked in the manual for session_readonly because its basicly what I need : 1 login page, and the just read the session data in other pages but, there is no examples or anything like that in the manual could you please show me a little example how to use it on my pages ? THANKS

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Login page: // suppose that user login was verified // Following code have to be executed only if user is valid session_start(); session_register(user,user_email);//register here all needed data. //In this case, it will register $user and $user_email

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
Hi Tom Thanks for your help but the problem still happens :-( First I tried to use session_readonly() but it was unknown FUNC` in my php, then I try the second way : I have header.php footer.php in the header I use session_start(); and in the footer I use session_write_close() and still every

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Tom Mikulecky
Hat you do is the same as if you do nothing, because your session_write_close() is called near the end of script and sessions are automatically closed at the end of a script. You should 'copy' all needed variables from the session in your header.php like this: session_start(); $copy_user =

[PHP] Re: Session's is slowing the page ??

2002-05-28 Thread Dima Dubin
THANK YOU !!! Tom Mikulecky [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hat you do is the same as if you do nothing, because your session_write_close() is called near the end of script and sessions are automatically closed at the end of a script. You

[PHP] Re: Session's is slowing the page ??

2002-05-27 Thread J Smith
It might have something to do with the way the session extension in PHP performs garbage collection. There's a setting in php.ini that basically controls how often garbage collection is performed. The value is a percentage, and determines how often the GC should be done over a random number

[PHP] Re: Session's is slowing the page ??

2002-05-27 Thread Dima Dubin
Hello J, I try to change the gc probability in the .htaccess (php_value session.gc_probability = 10) but it didnt work :-( Is there any other ideas ? maybe it a bug in PHP ? THANKS, Dima. J Smith [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... It might have