- 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 |
ui | standard |
VUFINDSESSION | 5n5gts155t32q8tbuuoit1vc0e |
language | ar |
Key | Value |
__Laminas | Array ( [_REQUEST_ACCESS_TIME] => 1747689447.9721 [_VALID] => Array ( [Laminas\Session\Validator\Id] => 5n5gts155t32q8tbuuoit1vc0e ) ) |
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/Record/1388/Export |
REDIRECT_SCRIPT_URI | https://library.arce.org/portal/Record/1388/Export |
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/Record/1388/Export |
SCRIPT_URI | https://library.arce.org/portal/Record/1388/Export |
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 | E6 |
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 | 052EEE8C3A1ACB80167A1D0988AF6E4CB111 |
SSL_SERVER_V_START | Apr 27 20:54:28 2025 GMT |
SSL_SERVER_V_END | Jul 26 20:54:27 2025 GMT |
SSL_SERVER_S_DN | CN=library.arce.org |
SSL_SERVER_I_DN | CN=E6,O=Let's Encrypt,C=US |
SSL_SERVER_A_KEY | id-ecPublicKey |
SSL_SERVER_A_SIG | ecdsa-with-SHA384 |
SSL_SESSION_ID | c29d66afd1b78db213a09308b884631edda4f15915ea8ffa01d392d32121ccae |
SSL_SESSION_RESUMED | Initial |
HTTP_HOST | library.arce.org |
HTTP_CONNECTION | keep-alive |
HTTP_PRAGMA | no-cache |
HTTP_CACHE_CONTROL | no-cache |
HTTP_SEC_CH_UA | "Chromium";v="130", "HeadlessChrome";v="130", "Not?A_Brand";v="99" |
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=5n5gts155t32q8tbuuoit1vc0e; language=ar |
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.188.46.100 |
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 | 38932 |
REMOTE_USER | |
REDIRECT_URL | /portal/Record/1388/Export |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /portal/Record/1388/Export |
SCRIPT_NAME | /portal/index.php |
PHP_SELF | /portal/index.php |
PHP_AUTH_USER | |
REQUEST_TIME_FLOAT | 1747689447.9457 |
REQUEST_TIME | 1747689447 |
* * @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 |
ui | standard |
VUFINDSESSION | 5n5gts155t32q8tbuuoit1vc0e |
language | ar |
Key | Value |
__Laminas | Array ( [_REQUEST_ACCESS_TIME] => 1747689447.9721 [_VALID] => Array ( [Laminas\Session\Validator\Id] => 5n5gts155t32q8tbuuoit1vc0e ) ) |
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/Record/1388/Export |
REDIRECT_SCRIPT_URI | https://library.arce.org/portal/Record/1388/Export |
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/Record/1388/Export |
SCRIPT_URI | https://library.arce.org/portal/Record/1388/Export |
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 | E6 |
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 | 052EEE8C3A1ACB80167A1D0988AF6E4CB111 |
SSL_SERVER_V_START | Apr 27 20:54:28 2025 GMT |
SSL_SERVER_V_END | Jul 26 20:54:27 2025 GMT |
SSL_SERVER_S_DN | CN=library.arce.org |
SSL_SERVER_I_DN | CN=E6,O=Let's Encrypt,C=US |
SSL_SERVER_A_KEY | id-ecPublicKey |
SSL_SERVER_A_SIG | ecdsa-with-SHA384 |
SSL_SESSION_ID | c29d66afd1b78db213a09308b884631edda4f15915ea8ffa01d392d32121ccae |
SSL_SESSION_RESUMED | Initial |
HTTP_HOST | library.arce.org |
HTTP_CONNECTION | keep-alive |
HTTP_PRAGMA | no-cache |
HTTP_CACHE_CONTROL | no-cache |
HTTP_SEC_CH_UA | "Chromium";v="130", "HeadlessChrome";v="130", "Not?A_Brand";v="99" |
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=5n5gts155t32q8tbuuoit1vc0e; language=ar |
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.188.46.100 |
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 | 38932 |
REMOTE_USER | |
REDIRECT_URL | /portal/Record/1388/Export |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /portal/Record/1388/Export |
SCRIPT_NAME | /portal/index.php |
PHP_SELF | /portal/index.php |
PHP_AUTH_USER | |
REQUEST_TIME_FLOAT | 1747689447.9457 |
REQUEST_TIME | 1747689447 |