- foreach (glob($this->path . "/sess_*") as $filename) {
- if (filemtime($filename) + $maxlifetime < time()) {
- unlink($filename);
- }
- }
- return true;
- }
- /**
- * A function that is called internally when session data is to be saved.
- *
- * @param string $sessId The current session ID
- * @param string $data The session data to write
- *
- * @return bool
- */
- protected function saveSession($sessId, $data)
- {
- $sessFile = $this->path . '/sess_' . $sessId;
- if ($handle = fopen($sessFile, "w")) {
- $return = fwrite($handle, $data);
- fclose($handle);
- if ($return !== false) {
- return true;
- }
- }
- // If we got this far, something went wrong with the file output...
- // It is tempting to throw an exception here, but this code is called
- // outside of the context of exception handling, so all we can do is
- // echo a message.
- echo 'Cannot write session to ' . $sessFile . "\n";
- return false;
- }
- }
foreach (glob($this->path . "/sess_*") as $filename) { if (filemtime($filename) + $maxlifetime < time()) { unlink($filename); } } return true; } /** * A function that is called internally when session data is to be saved. * * @param string $sessId The current session ID * @param string $data The session data to write * * @return bool */ protected function saveSession($sessId, $data) { $sessFile = $this->path . '/sess_' . $sessId; if ($handle = fopen($sessFile, "w")) { $return = fwrite($handle, $data); fclose($handle); if ($return !== false) { return true; } } // If we got this far, something went wrong with the file output... // It is tempting to throw an exception here, but this code is called // outside of the context of exception handling, so all we can do is // echo a message. echo 'Cannot write session to ' . $sessFile . "\n"; return false; } }
// Anecdotal testing Today and Yesterday seems to indicate destroy() // is called by the garbage collector and everything is good. // Something to keep in mind though. return true; } /** * Write function that is called when session data is to be saved. * * @param string $sessId The current session ID * @param string $data The session data to write * * @return bool */ public function write($sessId, $data) { if ($this->writesDisabled) { return true; } return $this->saveSession($sessId, $data); } /** * A function that is called internally when session data is to be saved. * * @param string $sessId The current session ID * @param string $data The session data to write * * @return bool */ abstract protected function saveSession($sessId, $data); }
* * @return void */ public function writeClose() { // The assumption is that we're using PHP's ext/session. // session_write_close() will actually overwrite $_SESSION with an // empty array on completion -- which leads to a mismatch between what // is in the storage object and $_SESSION. To get around this, we // temporarily reset $_SESSION to an array, and then re-link it to // the storage object. // // Additionally, while you _can_ write to $_SESSION following a // session_write_close() operation, no changes made to it will be // flushed to the session handler. As such, we now mark the storage // object isImmutable. $storage = $this->getStorage(); if (! $storage->isImmutable()) { $_SESSION = $storage->toArray(true); session_write_close(); $storage->fromArray($_SESSION); $storage->markImmutable(); } } /** * Attempt to set the session name * * If the session has already been started, or if the name provided fails * validation, an exception will be raised. * * @param string $name * @return SessionManager * @throws Exception\InvalidArgumentException */ public function setName($name) { if ($this->sessionExists()) { throw new Exception\InvalidArgumentException( 'Cannot set session name after a session has already started'
Key | Value |
edit | 28059972 |
Key | Value |
ui | standard |
VUFINDSESSION | tk9q94rne0oupib4o1autrloib |
Key | Value |
__Laminas | Array ( [_REQUEST_ACCESS_TIME] => 1743449083.0166 [_VALID] => Array ( [Laminas\Session\Validator\Id] => tk9q94rne0oupib4o1autrloib ) [FlashMessenger] => Array ( [EXPIRE_HOPS] => Array ( [hops] => 1 [ts] => 1743449083.0166 ) ) ) |
SessionState | Laminas\Stdlib\ArrayObject Object ( [storage:protected] => Array ( [cookiePath] => / ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) ) |
FlashMessenger | Laminas\Stdlib\ArrayObject Object ( [storage:protected] => Array ( ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) ) |
Key | Value |
REDIRECT_SCRIPT_URL | /portal/Search/Advanced |
REDIRECT_SCRIPT_URI | https://library.arce.org/portal/Search/Advanced |
REDIRECT_PERL5LIB | /usr/share/koha/lib |
REDIRECT_KOHA_CONF | /etc/koha/sites/library/koha-conf.xml |
REDIRECT_VUFIND_ENV | development |
REDIRECT_VUFIND_LOCAL_DIR | /usr/local/vufind/local |
REDIRECT_VUFIND_LOCAL_MODULES | CmsModule |
REDIRECT_Shib-Handler | https://library.arce.org/Shibboleth.sso |
REDIRECT_HTTPS | on |
REDIRECT_SSL_TLS_SNI | library.arce.org |
REDIRECT_STATUS | 200 |
SCRIPT_URL | /portal/Search/Advanced |
SCRIPT_URI | https://library.arce.org/portal/Search/Advanced |
PERL5LIB | /usr/share/koha/lib |
KOHA_CONF | /etc/koha/sites/library/koha-conf.xml |
VUFIND_ENV | development |
VUFIND_LOCAL_DIR | /usr/local/vufind/local |
VUFIND_LOCAL_MODULES | CmsModule |
Shib-Handler | https://library.arce.org/Shibboleth.sso |
HTTPS | on |
SSL_TLS_SNI | library.arce.org |
SSL_SERVER_S_DN_CN | library.arce.org |
SSL_SERVER_I_DN_C | US |
SSL_SERVER_I_DN_O | Let's Encrypt |
SSL_SERVER_I_DN_CN | E5 |
SSL_SERVER_SAN_DNS_0 | library.arce.org |
SSL_VERSION_INTERFACE | mod_ssl/2.4.62 |
SSL_VERSION_LIBRARY | OpenSSL/3.0.15 |
SSL_PROTOCOL | TLSv1.3 |
SSL_SECURE_RENEG | false |
SSL_COMPRESS_METHOD | NULL |
SSL_CIPHER | TLS_AES_128_GCM_SHA256 |
SSL_CIPHER_EXPORT | false |
SSL_CIPHER_USEKEYSIZE | 128 |
SSL_CIPHER_ALGKEYSIZE | 128 |
SSL_CLIENT_VERIFY | NONE |
SSL_SERVER_M_VERSION | 3 |
SSL_SERVER_M_SERIAL | 039C4552FCAA42C99B5C2814B26FE1B14895 |
SSL_SERVER_V_START | Feb 26 05:31:05 2025 GMT |
SSL_SERVER_V_END | May 27 05:31:04 2025 GMT |
SSL_SERVER_S_DN | CN=library.arce.org |
SSL_SERVER_I_DN | CN=E5,O=Let's Encrypt,C=US |
SSL_SERVER_A_KEY | id-ecPublicKey |
SSL_SERVER_A_SIG | ecdsa-with-SHA384 |
SSL_SESSION_ID | 4221c7e352db7dfae15b23ab0d2994fac69d846859d48eb0c3fbc8d5111d4158 |
SSL_SESSION_RESUMED | Resumed |
HTTP_HOST | library.arce.org |
HTTP_CONNECTION | keep-alive |
HTTP_PRAGMA | no-cache |
HTTP_CACHE_CONTROL | no-cache |
HTTP_SEC_CH_UA | "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129" |
HTTP_SEC_CH_UA_MOBILE | ?0 |
HTTP_SEC_CH_UA_PLATFORM | "Windows" |
HTTP_UPGRADE_INSECURE_REQUESTS | 1 |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 |
HTTP_SEC_FETCH_SITE | none |
HTTP_SEC_FETCH_MODE | navigate |
HTTP_SEC_FETCH_USER | ?1 |
HTTP_SEC_FETCH_DEST | document |
HTTP_ACCEPT_ENCODING | gzip, deflate, br, zstd |
HTTP_COOKIE | ui=standard; VUFINDSESSION=tk9q94rne0oupib4o1autrloib |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
SERVER_SIGNATURE | <address>Apache/2.4.62 (Debian) Server at library.arce.org Port 443</address> |
SERVER_SOFTWARE | Apache/2.4.62 (Debian) |
SERVER_NAME | library.arce.org |
SERVER_ADDR | 108.181.242.13 |
SERVER_PORT | 443 |
REMOTE_ADDR | 18.216.21.140 |
DOCUMENT_ROOT | /usr/share/koha/opac/htdocs |
REQUEST_SCHEME | https |
CONTEXT_PREFIX | /portal |
CONTEXT_DOCUMENT_ROOT | /usr/local/vufind/public |
SERVER_ADMIN | webmaster@localhost |
SCRIPT_FILENAME | /usr/local/vufind/public/index.php |
REMOTE_PORT | 27979 |
REMOTE_USER | |
REDIRECT_URL | /portal/Search/Advanced |
REDIRECT_QUERY_STRING | edit=28059972 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | edit=28059972 |
REQUEST_URI | /portal/Search/Advanced?edit=28059972 |
SCRIPT_NAME | /portal/index.php |
PHP_SELF | /portal/index.php |
PHP_AUTH_USER | |
REQUEST_TIME_FLOAT | 1743449082.9821 |
REQUEST_TIME | 1743449082 |
* * @return void */ public function writeClose() { // The assumption is that we're using PHP's ext/session. // session_write_close() will actually overwrite $_SESSION with an // empty array on completion -- which leads to a mismatch between what // is in the storage object and $_SESSION. To get around this, we // temporarily reset $_SESSION to an array, and then re-link it to // the storage object. // // Additionally, while you _can_ write to $_SESSION following a // session_write_close() operation, no changes made to it will be // flushed to the session handler. As such, we now mark the storage // object isImmutable. $storage = $this->getStorage(); if (! $storage->isImmutable()) { $_SESSION = $storage->toArray(true); session_write_close(); $storage->fromArray($_SESSION); $storage->markImmutable(); } } /** * Attempt to set the session name * * If the session has already been started, or if the name provided fails * validation, an exception will be raised. * * @param string $name * @return SessionManager * @throws Exception\InvalidArgumentException */ public function setName($name) { if ($this->sessionExists()) { throw new Exception\InvalidArgumentException( 'Cannot set session name after a session has already started'
* * @return void */ public function writeClose() { // The assumption is that we're using PHP's ext/session. // session_write_close() will actually overwrite $_SESSION with an // empty array on completion -- which leads to a mismatch between what // is in the storage object and $_SESSION. To get around this, we // temporarily reset $_SESSION to an array, and then re-link it to // the storage object. // // Additionally, while you _can_ write to $_SESSION following a // session_write_close() operation, no changes made to it will be // flushed to the session handler. As such, we now mark the storage // object isImmutable. $storage = $this->getStorage(); if (! $storage->isImmutable()) { $_SESSION = $storage->toArray(true); session_write_close(); $storage->fromArray($_SESSION); $storage->markImmutable(); } } /** * Attempt to set the session name * * If the session has already been started, or if the name provided fails * validation, an exception will be raised. * * @param string $name * @return SessionManager * @throws Exception\InvalidArgumentException */ public function setName($name) { if ($this->sessionExists()) { throw new Exception\InvalidArgumentException( 'Cannot set session name after a session has already started'
Key | Value |
edit | 28059972 |
Key | Value |
ui | standard |
VUFINDSESSION | tk9q94rne0oupib4o1autrloib |
Key | Value |
__Laminas | Array ( [_REQUEST_ACCESS_TIME] => 1743449083.0166 [_VALID] => Array ( [Laminas\Session\Validator\Id] => tk9q94rne0oupib4o1autrloib ) [FlashMessenger] => Array ( [EXPIRE_HOPS] => Array ( [hops] => 1 [ts] => 1743449083.0166 ) ) ) |
SessionState | Laminas\Stdlib\ArrayObject Object ( [storage:protected] => Array ( [cookiePath] => / ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) ) |
FlashMessenger | Laminas\Stdlib\ArrayObject Object ( [storage:protected] => Array ( ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) ) |
Key | Value |
REDIRECT_SCRIPT_URL | /portal/Search/Advanced |
REDIRECT_SCRIPT_URI | https://library.arce.org/portal/Search/Advanced |
REDIRECT_PERL5LIB | /usr/share/koha/lib |
REDIRECT_KOHA_CONF | /etc/koha/sites/library/koha-conf.xml |
REDIRECT_VUFIND_ENV | development |
REDIRECT_VUFIND_LOCAL_DIR | /usr/local/vufind/local |
REDIRECT_VUFIND_LOCAL_MODULES | CmsModule |
REDIRECT_Shib-Handler | https://library.arce.org/Shibboleth.sso |
REDIRECT_HTTPS | on |
REDIRECT_SSL_TLS_SNI | library.arce.org |
REDIRECT_STATUS | 200 |
SCRIPT_URL | /portal/Search/Advanced |
SCRIPT_URI | https://library.arce.org/portal/Search/Advanced |
PERL5LIB | /usr/share/koha/lib |
KOHA_CONF | /etc/koha/sites/library/koha-conf.xml |
VUFIND_ENV | development |
VUFIND_LOCAL_DIR | /usr/local/vufind/local |
VUFIND_LOCAL_MODULES | CmsModule |
Shib-Handler | https://library.arce.org/Shibboleth.sso |
HTTPS | on |
SSL_TLS_SNI | library.arce.org |
SSL_SERVER_S_DN_CN | library.arce.org |
SSL_SERVER_I_DN_C | US |
SSL_SERVER_I_DN_O | Let's Encrypt |
SSL_SERVER_I_DN_CN | E5 |
SSL_SERVER_SAN_DNS_0 | library.arce.org |
SSL_VERSION_INTERFACE | mod_ssl/2.4.62 |
SSL_VERSION_LIBRARY | OpenSSL/3.0.15 |
SSL_PROTOCOL | TLSv1.3 |
SSL_SECURE_RENEG | false |
SSL_COMPRESS_METHOD | NULL |
SSL_CIPHER | TLS_AES_128_GCM_SHA256 |
SSL_CIPHER_EXPORT | false |
SSL_CIPHER_USEKEYSIZE | 128 |
SSL_CIPHER_ALGKEYSIZE | 128 |
SSL_CLIENT_VERIFY | NONE |
SSL_SERVER_M_VERSION | 3 |
SSL_SERVER_M_SERIAL | 039C4552FCAA42C99B5C2814B26FE1B14895 |
SSL_SERVER_V_START | Feb 26 05:31:05 2025 GMT |
SSL_SERVER_V_END | May 27 05:31:04 2025 GMT |
SSL_SERVER_S_DN | CN=library.arce.org |
SSL_SERVER_I_DN | CN=E5,O=Let's Encrypt,C=US |
SSL_SERVER_A_KEY | id-ecPublicKey |
SSL_SERVER_A_SIG | ecdsa-with-SHA384 |
SSL_SESSION_ID | 4221c7e352db7dfae15b23ab0d2994fac69d846859d48eb0c3fbc8d5111d4158 |
SSL_SESSION_RESUMED | Resumed |
HTTP_HOST | library.arce.org |
HTTP_CONNECTION | keep-alive |
HTTP_PRAGMA | no-cache |
HTTP_CACHE_CONTROL | no-cache |
HTTP_SEC_CH_UA | "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129" |
HTTP_SEC_CH_UA_MOBILE | ?0 |
HTTP_SEC_CH_UA_PLATFORM | "Windows" |
HTTP_UPGRADE_INSECURE_REQUESTS | 1 |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 |
HTTP_SEC_FETCH_SITE | none |
HTTP_SEC_FETCH_MODE | navigate |
HTTP_SEC_FETCH_USER | ?1 |
HTTP_SEC_FETCH_DEST | document |
HTTP_ACCEPT_ENCODING | gzip, deflate, br, zstd |
HTTP_COOKIE | ui=standard; VUFINDSESSION=tk9q94rne0oupib4o1autrloib |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
SERVER_SIGNATURE | <address>Apache/2.4.62 (Debian) Server at library.arce.org Port 443</address> |
SERVER_SOFTWARE | Apache/2.4.62 (Debian) |
SERVER_NAME | library.arce.org |
SERVER_ADDR | 108.181.242.13 |
SERVER_PORT | 443 |
REMOTE_ADDR | 18.216.21.140 |
DOCUMENT_ROOT | /usr/share/koha/opac/htdocs |
REQUEST_SCHEME | https |
CONTEXT_PREFIX | /portal |
CONTEXT_DOCUMENT_ROOT | /usr/local/vufind/public |
SERVER_ADMIN | webmaster@localhost |
SCRIPT_FILENAME | /usr/local/vufind/public/index.php |
REMOTE_PORT | 27979 |
REMOTE_USER | |
REDIRECT_URL | /portal/Search/Advanced |
REDIRECT_QUERY_STRING | edit=28059972 |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | edit=28059972 |
REQUEST_URI | /portal/Search/Advanced?edit=28059972 |
SCRIPT_NAME | /portal/index.php |
PHP_SELF | /portal/index.php |
PHP_AUTH_USER | |
REQUEST_TIME_FLOAT | 1743449082.9821 |
REQUEST_TIME | 1743449082 |