To see my page describing the peculiarities of PHP at SCCC , go to : http://www.seattlecentral.edu/it-services/wiki/PHPSCCC
To read my step-by-step howto for using sessions at SCCC, go to : http://www.seattlecentral.edu/it-services/wiki/PHPSessions
To see the source of this script, go to : http://www.seattlecentral.edu/~dmartin/test.phps
This php script is running as the user: print array_shift(posix_getpwuid(posix_getuid())); ?>
Your session ID is echo session_id() ?>
You have seen this page times.
http://www.seattlecentral.edu/~dmartin/test.php
There's nothing special about ENDSESSION, I just test for it at the beginning of the script and then reset the session if I find it.
Remember, this php script is running as the user: print array_shift(posix_getpwuid(posix_getuid())); ?>
In echo session_save_path() ?>...
"; $maxprint = 5; $loop_count = 0; # Lets print info about up to 5 files while ($file = readdir($dirhandle)) { # skip the '.' and '..' files if ( $file == '.' or $file == '..' ) { continue; } $pathto = session_save_path().'/'.$file; # Lets delete session files that are older than one day $mtime = filemtime($pathto); $age = time() - $mtime; if ( $age > 86400 ) { unlink($pathto); continue; } $loop_count++; if ($loop_count > $maxprint) { # not break because we are counting how many files there are continue; } print "If the permissions say '0600', then only the owner of those files can read and write to them. That means you can't write a script to read the contents of these files, only I can do that. That's pretty cool.
To see the source of this script, go to : http://www.seattlecentral.edu/~dmartin/test.phps