I was wondering if anyone has ever thought of comming up with a different way of handling the code below. I know that you can use shared memory, but that wont work for win and it wont work for web cluseters using db's to handle their sessions. Also sessions will automatically handle locking of the session info. so you don't need to worry about using shm locking the shm.
<? session_start(); $old_session = session_id(); session_write_close(); session_id('1'); session_start(); session_register("counter"); $my_counter = $counter++; session_write_close(); session_id($old_session); session_start(); session_register("sess_counter"); $my_sess_counter = $sess_counter++; session_write_close(); echo "this page has been viewed $my_counter times and $my_sess_counter by you"; ?> i guess what im suggesting is something like this <? session_global("counter"); $counter++; // cause we don't want to lock the global session info for too long session_global_write_close(); session_register("sess_counter"); $sess_counter++; echo "this page has been viewed $counter times and $sess_counter by you"; ?> ( i know about the session_register is depericated... its just register_globals is on on my machine so i'm using it :) ) Any comments? :Brad __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php