You are here: Sessions again.... « PHP « IT news, forums, messages
Sessions again....

Posted by Suhas on 08/04/05 23:13

Hello,
I am trying to understand how sessions work. I have this code. My
understanding is after 1 sec of script completion, (may be little
after that), the session should destroy.

I understand that it is huge overhead for server, not planning to do
this but want to understand how it really works.

This server uses cookie to store session. Setings in php.ini file are
defaut (1440 and probility is 1)


ini_set('session.auto_start', '0');
session_id('SSP');
session_cache_limiter("nocache");
ini_set('session.cookie_lifetime', '0');
ini_set('session.gc_probability', '100');
ini_set('session.gc_divisor', '100');
ini_set('session.gc_maxlifetime', '1');
session_start();

if(!session_is_registered('count'))
session_register('count');

echo ++$_SESSION['count'];

Any help will be appriciated!

Thanks
SP

 

Navigation:

[Reply to this 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

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