/**
* {@inheritdoc}
*/
protected function doHave(string $id)
{
$file = $this->getFile($id);
return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id]));
}
/**
* {@inheritdoc}
*/
protected function doSave(array $values, int $lifetime)
{
$expiresAt = $lifetime ? (time() + $lifetime) : 0;
$values = $this->marshaller->marshall($values, $failed);
foreach ($values as $id => $value) {
if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) {
$failed[] = $id;
}
}
if ($failed && !is_writable($this->directory)) {
throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory));
}
return $failed;
}
private function getFileKey(string $file): string
{
if (!$h = @fopen($file, 'r')) {
return '';
}
fgets($h); // expiry
$encodedKey = fgets($h);
fclose($h);
"Allowed memory size of 134217728 bytes exhausted (tried to allocate 61609296 bytes)"
*
* @return void
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->allowQuit = false;
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* @param Throwable $exception
*
* @return Inspector
*/
private function getInspector($exception)
{
return new Inspector($exception);
}
/**
* Resolves the giving handler.
*
* @param callable|HandlerInterface $handler
*
* @return HandlerInterface
Key | Value |
zip | "web/tengine"
|
Key | Value |
USER | "www"
|
HOME | "/home/www"
|
HTTP_HOST | "mirror.cnop.net"
|
HTTP_USER_AGENT | "claudebot"
|
HTTP_ACCEPT | "*/*"
|
PATH_INFO | "" |
REDIRECT_STATUS | "200"
|
SERVER_NAME | "mirror.cnop.net"
|
SERVER_PORT | "80"
|
SERVER_ADDR | "80.208.227.124"
|
REMOTE_PORT | "49036"
|
REMOTE_ADDR | "35.175.236.44"
|
SERVER_SOFTWARE | "nginx/1.19.9"
|
GATEWAY_INTERFACE | "CGI/1.1"
|
REQUEST_SCHEME | "http"
|
SERVER_PROTOCOL | "HTTP/1.1"
|
DOCUMENT_ROOT | "/www/wwwroot/mirror.cnop.net"
|
DOCUMENT_URI | "/index.php"
|
REQUEST_URI | "/?zip=web/tengine"
|
SCRIPT_NAME | "/index.php"
|
CONTENT_LENGTH | "" |
CONTENT_TYPE | "" |
REQUEST_METHOD | "GET"
|
QUERY_STRING | "zip=web/tengine"
|
SCRIPT_FILENAME | "/www/wwwroot/mirror.cnop.net/index.php"
|
FCGI_ROLE | "RESPONDER"
|
PHP_SELF | "/index.php"
|
REQUEST_TIME_FLOAT | 1711641647.6638
|
REQUEST_TIME | 1711641647
|
APP_DEBUG | "false"
|
APP_LANGUAGE | "en"
|
DISPLAY_READMES | "true"
|
READMES_FIRST | "false"
|
ZIP_DOWNLOADS | "true"
|
GOOGLE_ANALYTICS_ID | "false"
|
MATOMO_ANALYTICS_URL | "false"
|
MATOMO_ANALYTICS_ID | "false"
|
SORT_ORDER | "type"
|
REVERSE_SORT | "false"
|
Key | Value |
APP_DEBUG | "false"
|
APP_LANGUAGE | "en"
|
DISPLAY_READMES | "true"
|
READMES_FIRST | "false"
|
ZIP_DOWNLOADS | "true"
|
GOOGLE_ANALYTICS_ID | "false"
|
MATOMO_ANALYTICS_URL | "false"
|
MATOMO_ANALYTICS_ID | "false"
|
SORT_ORDER | "type"
|
REVERSE_SORT | "false"
|