Zend \ Log \ Exception \ RuntimeException
"/opt/vufind-instances/eles/logs/vufind.log" cannot be opened with mode "a"
Previous exceptions
  • fopen(/opt/vufind-instances/eles/logs/vufind.log): failed to open stream: Engedély megtagadva (0)
Zend\Log\Exception\RuntimeException thrown with message ""/opt/vufind-instances/eles/logs/vufind.log" cannot be opened with mode "a"" Stacktrace: #27 Zend\Log\Exception\RuntimeException in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php:89 #26 ErrorException in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php:86 #25 fopen in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php:86 #24 Zend\Log\Writer\Stream:__construct in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php:135 #23 VuFind\Log\LoggerFactory:addFileWriters in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php:230 #22 VuFind\Log\LoggerFactory:configureLogger in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php:386 #21 VuFind\Log\LoggerFactory:VuFind\Log\{closure} in /mnt/monguz/vufind-instances/6.1.2/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php:70 #20 Closure:__invoke in /mnt/monguz/vufind-instances/6.1.2/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php:70 #19 ProxyManagerGeneratedProxy\__PM__\VuFind\Log\Logger\Generatedbf9e1a8c6468378ed60683df3296e638:debug in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php:102 #18 VuFindSearch\Backend\Solr\Connector:log in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php:82 #17 VuFindSearch\Backend\Solr\Connector:debug in /mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php:364 #16 VuFindSearch\Backend\Solr\Connector:query in /mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php:186 #15 VuFindSearch\Backend\Solr\Connector:retrieve in /mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php:166 #14 VuFindSearch\Backend\Solr\Backend:retrieve in /mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Service.php:140 #13 VuFindSearch\Service:retrieve in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Record/Loader.php:123 #12 VuFind\Record\Loader:load in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php:656 #11 VuFind\Controller\AbstractRecord:loadRecord in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php:686 #10 VuFind\Controller\AbstractRecord:loadTabDetails in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php:705 #9 VuFind\Controller\AbstractRecord:getDefaultTab in /mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php:280 #8 VuFind\Controller\AbstractRecord:homeAction in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php:78 #7 Zend\Mvc\Controller\AbstractActionController:onDispatch in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php:322 #6 Zend\EventManager\EventManager:triggerListeners in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php:179 #5 Zend\EventManager\EventManager:triggerEventUntil in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php:104 #4 Zend\Mvc\Controller\AbstractController:dispatch in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/DispatchListener.php:138 #3 Zend\Mvc\DispatchListener:onDispatch in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php:322 #2 Zend\EventManager\EventManager:triggerListeners in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php:179 #1 Zend\EventManager\EventManager:triggerEventUntil in /mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Application.php:332 #0 Zend\Mvc\Application:run in /mnt/monguz/vufind-instances/eles/public/index.php:83
Stack frames (28)
27
Zend\Log\Exception\RuntimeException
/vendor/zendframework/zend-log/src/Writer/Stream.php89
26
ErrorException
/vendor/zendframework/zend-log/src/Writer/Stream.php86
25
fopen
/vendor/zendframework/zend-log/src/Writer/Stream.php86
24
Zend\Log\Writer\Stream __construct
/module/VuFind/src/VuFind/Log/LoggerFactory.php135
23
VuFind\Log\LoggerFactory addFileWriters
/module/VuFind/src/VuFind/Log/LoggerFactory.php230
22
VuFind\Log\LoggerFactory configureLogger
/module/VuFind/src/VuFind/Log/LoggerFactory.php386
21
VuFind\Log\LoggerFactory VuFind\Log\{closure}
/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php70
20
Closure __invoke
/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php70
19
ProxyManagerGeneratedProxy\__PM__\VuFind\Log\Logger\Generatedbf9e1a8c6468378ed60683df3296e638 debug
/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php102
18
VuFindSearch\Backend\Solr\Connector log
/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php82
17
VuFindSearch\Backend\Solr\Connector debug
/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php364
16
VuFindSearch\Backend\Solr\Connector query
/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php186
15
VuFindSearch\Backend\Solr\Connector retrieve
/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php166
14
VuFindSearch\Backend\Solr\Backend retrieve
/module/VuFindSearch/src/VuFindSearch/Service.php140
13
VuFindSearch\Service retrieve
/module/VuFind/src/VuFind/Record/Loader.php123
12
VuFind\Record\Loader load
/module/VuFind/src/VuFind/Controller/AbstractRecord.php656
11
VuFind\Controller\AbstractRecord loadRecord
/module/VuFind/src/VuFind/Controller/AbstractRecord.php686
10
VuFind\Controller\AbstractRecord loadTabDetails
/module/VuFind/src/VuFind/Controller/AbstractRecord.php705
9
VuFind\Controller\AbstractRecord getDefaultTab
/module/VuFind/src/VuFind/Controller/AbstractRecord.php280
8
VuFind\Controller\AbstractRecord homeAction
/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php78
7
Zend\Mvc\Controller\AbstractActionController onDispatch
/vendor/zendframework/zend-eventmanager/src/EventManager.php322
6
Zend\EventManager\EventManager triggerListeners
/vendor/zendframework/zend-eventmanager/src/EventManager.php179
5
Zend\EventManager\EventManager triggerEventUntil
/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php104
4
Zend\Mvc\Controller\AbstractController dispatch
/vendor/zendframework/zend-mvc/src/DispatchListener.php138
3
Zend\Mvc\DispatchListener onDispatch
/vendor/zendframework/zend-eventmanager/src/EventManager.php322
2
Zend\EventManager\EventManager triggerListeners
/vendor/zendframework/zend-eventmanager/src/EventManager.php179
1
Zend\EventManager\EventManager triggerEventUntil
/vendor/zendframework/zend-mvc/src/Application.php332
0
Zend\Mvc\Application run
/mnt/monguz/vufind-instances/eles/public/index.php83
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php
            }
 
            if ('a' != $mode) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Mode must be "a" on existing streams; received "%s"',
                    $mode
                ));
            }
 
            $this->stream = $streamOrUrl;
        } else {
            ErrorHandler::start();
            if (isset($filePermissions) && ! file_exists($streamOrUrl) && is_writable(dirname($streamOrUrl))) {
                touch($streamOrUrl);
                chmod($streamOrUrl, $filePermissions);
            }
            $this->stream = fopen($streamOrUrl, $mode, false);
            $error = ErrorHandler::stop();
            if (! $this->stream) {
                throw new Exception\RuntimeException(sprintf(
                    '"%s" cannot be opened with mode "%s"',
                    $streamOrUrl,
                    $mode
                ), 0, $error);
            }
        }
 
        if (null !== $logSeparator) {
            $this->setLogSeparator($logSeparator);
        }
 
        if ($this->formatter === null) {
            $this->formatter = new SimpleFormatter();
        }
    }
 
    /**
     * Write a message to the log.
     *
     * @param array $event event data
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php
                    'Resource is not a stream; received "%s',
                    get_resource_type($streamOrUrl)
                ));
            }
 
            if ('a' != $mode) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Mode must be "a" on existing streams; received "%s"',
                    $mode
                ));
            }
 
            $this->stream = $streamOrUrl;
        } else {
            ErrorHandler::start();
            if (isset($filePermissions) && ! file_exists($streamOrUrl) && is_writable(dirname($streamOrUrl))) {
                touch($streamOrUrl);
                chmod($streamOrUrl, $filePermissions);
            }
            $this->stream = fopen($streamOrUrl, $mode, false);
            $error = ErrorHandler::stop();
            if (! $this->stream) {
                throw new Exception\RuntimeException(sprintf(
                    '"%s" cannot be opened with mode "%s"',
                    $streamOrUrl,
                    $mode
                ), 0, $error);
            }
        }
 
        if (null !== $logSeparator) {
            $this->setLogSeparator($logSeparator);
        }
 
        if ($this->formatter === null) {
            $this->formatter = new SimpleFormatter();
        }
    }
 
    /**
Exception message: fopen(/opt/vufind-instances/eles/logs/vufind.log): failed to open stream: Engedély megtagadva
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-log/src/Writer/Stream.php
                    'Resource is not a stream; received "%s',
                    get_resource_type($streamOrUrl)
                ));
            }
 
            if ('a' != $mode) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Mode must be "a" on existing streams; received "%s"',
                    $mode
                ));
            }
 
            $this->stream = $streamOrUrl;
        } else {
            ErrorHandler::start();
            if (isset($filePermissions) && ! file_exists($streamOrUrl) && is_writable(dirname($streamOrUrl))) {
                touch($streamOrUrl);
                chmod($streamOrUrl, $filePermissions);
            }
            $this->stream = fopen($streamOrUrl, $mode, false);
            $error = ErrorHandler::stop();
            if (! $this->stream) {
                throw new Exception\RuntimeException(sprintf(
                    '"%s" cannot be opened with mode "%s"',
                    $streamOrUrl,
                    $mode
                ), 0, $error);
            }
        }
 
        if (null !== $logSeparator) {
            $this->setLogSeparator($logSeparator);
        }
 
        if ($this->formatter === null) {
            $this->formatter = new SimpleFormatter();
        }
    }
 
    /**
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php
     * @param string $config Configuration
     *
     * @return void
     */
    protected function addFileWriters(Logger $logger, $config)
    {
        // Make sure to use only the last ':' after second character to avoid trouble
        // with Windows drive letters (e.g. "c:\something\logfile:error-5")
        $pos = strrpos($config, ':', 2);
        if ($pos > 0) {
            $file = substr($config, 0, $pos);
            $error_types = substr($config, $pos + 1);
        } else {
            $file = $config;
            $error_types = '';
        }
 
        // Make Writers
        $filters = explode(',', $error_types);
        $writer = new Writer\Stream($file);
        $this->addWriters($logger, $writer, $filters);
    }
 
    /**
     * Configure Slack writers.
     *
     * @param Logger             $logger    Logger object
     * @param ContainerInterface $container Service manager
     * @param Config             $config    Configuration
     *
     * @return void
     */
    protected function addSlackWriters(Logger $logger, ContainerInterface $container,
        Config $config
    ) {
        $options = [];
        // Get config
        list($channel, $error_types) = explode(':', $config->Logging->slack);
        if ($error_types == null) {
            $error_types = $channel;
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php
            ->get('config');
 
        $hasWriter = false;
 
        // DEBUGGER
        if (!$config->System->debug == false || $this->hasDynamicDebug($container)) {
            $hasWriter = true;
            $this->addDebugWriter($logger, $config->System->debug);
        }
 
        // Activate database logging, if applicable:
        if (isset($config->Logging->database)) {
            $hasWriter = true;
            $this->addDbWriters($logger, $container, $config->Logging->database);
        }
 
        // Activate file logging, if applicable:
        if (isset($config->Logging->file)) {
            $hasWriter = true;
            $this->addFileWriters($logger, $config->Logging->file);
        }
 
        // Activate email logging, if applicable:
        if (isset($config->Logging->email)) {
            $hasWriter = true;
            $this->addEmailWriters($logger, $container, $config);
        }
 
        // Activate slack logging, if applicable:
        if (isset($config->Logging->slack) && isset($config->Logging->slackurl)) {
            $hasWriter = true;
            $this->addSlackWriters($logger, $container, $config);
        }
 
        // Null (no-op) writer to avoid errors
        if (!$hasWriter) {
            $logger->addWriter(new \Zend\Log\Writer\Noop());
        }
    }
 
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerFactory.php
     * @throws ServiceNotCreatedException if an exception is raised when
     * creating a service.
     * @throws ContainerException if any other error occurs
     */
    public function __invoke(ContainerInterface $container, $requestedName,
        array $options = null
    ) {
        if (!empty($options)) {
            throw new \Exception('Unexpected options passed to factory.');
        }
        // Construct the logger as a lazy loading value holder so that
        // the object is not instantiated until it is called. This helps break
        // potential circular dependencies with other services.
        $callback = function (& $wrapped, $proxy) use ($container, $requestedName) {
            // Indicate that initialization is complete to avoid reinitialization:
            $proxy->setProxyInitializer(null);
 
            // Now build the actual service:
            $wrapped = new $requestedName();
            $this->configureLogger($container, $wrapped);
        };
        $cfg = $container->get(\ProxyManager\Configuration::class);
        $factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory($cfg);
        return $factory->createProxy($requestedName, $callback);
    }
}
 
/mnt/monguz/vufind-instances/6.1.2/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php
     * {@inheritDoc}
     */
    public function generate(ClassGenerator $classGenerator) : string
    {
        $code = $classGenerator->generate();
 
        // @codeCoverageIgnoreStart
        if (! $this->canEval) {
            $fileName = tempnam(sys_get_temp_dir(), 'EvaluatingGeneratorStrategy.php.tmp.');
 
            file_put_contents($fileName, "<?php\n" . $code);
            /* @noinspection PhpIncludeInspection */
            require $fileName;
            unlink($fileName);
 
            return $code;
        }
        // @codeCoverageIgnoreEnd
 
        eval($code);
 
        return $code;
    }
}
 
/mnt/monguz/vufind-instances/6.1.2/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php
     * {@inheritDoc}
     */
    public function generate(ClassGenerator $classGenerator) : string
    {
        $code = $classGenerator->generate();
 
        // @codeCoverageIgnoreStart
        if (! $this->canEval) {
            $fileName = tempnam(sys_get_temp_dir(), 'EvaluatingGeneratorStrategy.php.tmp.');
 
            file_put_contents($fileName, "<?php\n" . $code);
            /* @noinspection PhpIncludeInspection */
            require $fileName;
            unlink($fileName);
 
            return $code;
        }
        // @codeCoverageIgnoreEnd
 
        eval($code);
 
        return $code;
    }
}
 
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php
    }
 
    /**
     * Send a message to the logger.
     *
     * @param string $level        Log level
     * @param string $message      Log message
     * @param array  $context      Log context
     * @param bool   $prependClass Prepend class name to message?
     *
     * @return void
     */
    protected function log($level, $message, array $context = [],
        $prependClass = false
    ) {
        if ($this->logger) {
            if ($prependClass) {
                $message = get_class($this) . ': ' . $message;
            }
            $this->logger->$level($message, $context);
        }
    }
}
 
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Log/LoggerAwareTrait.php
     *
     * @return void
     */
    protected function logWarning($msg, array $context = [], $prependClass = true)
    {
        return $this->log('warn', $msg, $context, $prependClass);
    }
 
    /**
     * Log a debug message.
     *
     * @param string $msg          Log message
     * @param array  $context      Log context
     * @param bool   $prependClass Prepend class name to message?
     *
     * @return void
     */
    protected function debug($msg, array $context = [], $prependClass = true)
    {
        return $this->log('debug', $msg, $context, $prependClass);
    }
 
    /**
     * Send a message to the logger.
     *
     * @param string $level        Log level
     * @param string $message      Log message
     * @param array  $context      Log context
     * @param bool   $prependClass Prepend class name to message?
     *
     * @return void
     */
    protected function log($level, $message, array $context = [],
        $prependClass = false
    ) {
        if ($this->logger) {
            if ($prependClass) {
                $message = get_class($this) . ': ' . $message;
            }
            $this->logger->$level($message, $context);
/mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php
     * @return string Response body
     */
    public function query($handler, ParamBag $params)
    {
        $urlSuffix = '/' . $handler;
        $paramString = implode('&', $params->request());
        if (strlen($paramString) > self::MAX_GET_URL_LENGTH) {
            $method = Request::METHOD_POST;
            $callback = function ($client) use ($paramString) {
                $client->setRawBody($paramString);
                $client->setEncType(HttpClient::ENC_URLENCODED);
                $client->setHeaders(['Content-Length' => strlen($paramString)]);
            };
        } else {
            $method = Request::METHOD_GET;
            $urlSuffix .= '?' . $paramString;
            $callback = null;
        }
 
        $this->debug(sprintf('Query %s', $paramString));
        return $this->trySolrUrls($method, $urlSuffix, $callback);
    }
 
    /**
     * Check if an exception from a Solr request should be thrown rather than retried
     *
     * @param \Exception $ex Exception
     *
     * @return bool
     */
    protected function isRethrowableSolrException($ex)
    {
        return $ex instanceof TimeoutException
            || $ex instanceof RequestErrorException;
    }
 
    /**
     * If an unexpected exception type was received, wrap it in a generic
     * BackendException to standardize upstream handling.
     *
/mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Connector.php
    }
 
    /**
     * Return document specified by id.
     *
     * @param string   $id     The document to retrieve from Solr
     * @param ParamBag $params Parameters
     *
     * @return string
     */
    public function retrieve($id, ParamBag $params = null)
    {
        $params = $params ?: new ParamBag();
        $params
            ->set('q', sprintf('%s:"%s"', $this->uniqueKey, addcslashes($id, '"')));
 
        $handler = $this->map->getHandler(__FUNCTION__);
        $this->map->prepare(__FUNCTION__, $params);
 
        return $this->query($handler, $params);
    }
 
    /**
     * Return records similar to a given record specified by id.
     *
     * Uses MoreLikeThis Request Component or MoreLikeThis Handler
     *
     * @param string   $id     ID of given record (not currently used, but
     * retained for backward compatibility / extensibility).
     * @param ParamBag $params Parameters
     *
     * @return string
     *
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function similar($id, ParamBag $params)
    {
        $handler = $this->map->getHandler(__FUNCTION__);
        $this->map->prepare(__FUNCTION__, $params);
        return $this->query($handler, $params);
/mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Backend.php
        $sort = "{$random}_random asc";
        $params->set('sort', $sort);
 
        return $this->search($query, 0, $limit, $params);
    }
 
    /**
     * Retrieve a single document.
     *
     * @param string   $id     Document identifier
     * @param ParamBag $params Search backend parameters
     *
     * @return RecordCollectionInterface
     */
    public function retrieve($id, ParamBag $params = null)
    {
        $params = $params ?: new ParamBag();
        $this->injectResponseWriter($params);
 
        $response   = $this->connector->retrieve($id, $params);
        $collection = $this->createRecordCollection($response);
        $this->injectSourceIdentifier($collection);
        return $collection;
    }
 
    /**
     * Retrieve a batch of documents.
     *
     * @param array    $ids    Array of document identifiers
     * @param ParamBag $params Search backend parameters
     *
     * @return RecordCollectionInterface
     */
    public function retrieveBatch($ids, ParamBag $params = null)
    {
        $params = $params ?: new ParamBag();
 
        // Load 100 records at a time; this is a good number to avoid memory
        // problems while still covering a lot of ground.
        $pageSize = 100;
/mnt/monguz/vufind-instances/6.1.2/module/VuFindSearch/src/VuFindSearch/Service.php
    /**
     * Retrieve a single record.
     *
     * @param string   $backend Search backend identifier
     * @param string   $id      Record identifier
     * @param ParamBag $params  Search backend parameters
     *
     * @return RecordCollectionInterface
     */
    public function retrieve($backend, $id, ParamBag $params = null)
    {
        $params  = $params ?: new ParamBag();
        $context = __FUNCTION__;
        $args = compact('backend', 'id', 'params', 'context');
        $backend = $this->resolve($backend, $args);
        $args['backend_instance'] = $backend;
 
        $this->triggerPre($backend, $args);
        try {
            $response = $backend->retrieve($id, $params);
        } catch (BackendException $e) {
            $this->triggerError($e, $args);
            throw $e;
        }
        $this->triggerPost($response, $args);
        return $response;
    }
 
    /**
     * Retrieve a batch of records.
     *
     * @param string   $backend Search backend identifier
     * @param array    $ids     Record identifier
     * @param ParamBag $params  Search backend parameters
     *
     * @return RecordCollectionInterface
     */
    public function retrieveBatch($backend, $ids, ParamBag $params = null)
    {
        $params  = $params ?: new ParamBag();
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Record/Loader.php
     * @param bool     $tolerateMissing Should we load a "Missing" placeholder
     * instead of throwing an exception if the record cannot be found?
     * @param ParamBag $params          Search backend parameters
     *
     * @throws \Exception
     * @return \VuFind\RecordDriver\AbstractBase
     */
    public function load($id, $source = DEFAULT_SEARCH_BACKEND,
        $tolerateMissing = false, ParamBag $params = null
    ) {
        if (null !== $id && '' !== $id) {
            $results = [];
            if (null !== $this->recordCache
                && $this->recordCache->isPrimary($source)
            ) {
                $results = $this->recordCache->lookup($id, $source);
            }
            if (empty($results)) {
                try {
                    $results = $this->searchService->retrieve($source, $id, $params)
                        ->getRecords();
                } catch (BackendException $e) {
                    if (!$tolerateMissing) {
                        throw $e;
                    }
                }
            }
            if (empty($results) && null !== $this->recordCache
                && $this->recordCache->isFallback($source)
            ) {
                $results = $this->recordCache->lookup($id, $source);
            }
 
            if (!empty($results)) {
                return $results[0];
            }
 
            if ($this->fallbackLoader
                && $this->fallbackLoader->has($source)
            ) {
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php
     * when homeAction() forwards to another method.
     *
     * @return AbstractRecordDriver
     */
    protected function loadRecord()
    {
        // Only load the record if it has not already been loaded.  Note that
        // when determining record ID, we check both the route match (the most
        // common scenario) and the GET parameters (a fallback used by some
        // legacy routes).
        if (!is_object($this->driver)) {
            $recordLoader = $this->getRecordLoader();
            $cacheContext = $this->getRequest()->getQuery()->get('cacheContext');
            if (isset($cacheContext)) {
                $recordLoader->setCacheContext($cacheContext);
            }
            $this->driver = $recordLoader->load(
                $this->params()->fromRoute('id', $this->params()->fromQuery('id')),
                $this->searchClassId,
                false
            );
        }
        return $this->driver;
    }
 
    /**
     * Redirect the user to the main record view.
     *
     * @param string $params Parameters to append to record URL.
     * @param string $tab    Record tab to display (null for default).
     *
     * @return mixed
     */
    protected function redirectToRecord($params = '', $tab = null)
    {
        $details = $this->getRecordRouter()
            ->getTabRouteDetails($this->loadRecord(), $tab);
        $target = $this->url()->fromRoute($details['route'], $details['params']);
 
        return $this->redirect()->toUrl($target . $params);
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php
     *
     * @return mixed
     */
    protected function redirectToRecord($params = '', $tab = null)
    {
        $details = $this->getRecordRouter()
            ->getTabRouteDetails($this->loadRecord(), $tab);
        $target = $this->url()->fromRoute($details['route'], $details['params']);
 
        return $this->redirect()->toUrl($target . $params);
    }
 
    /**
     * Support method to load tab information from the RecordTab PluginManager.
     *
     * @return void
     */
    protected function loadTabDetails()
    {
        $driver = $this->loadRecord();
        $request = $this->getRequest();
        $manager = $this->getRecordTabManager();
        $details = $manager
            ->getTabDetailsForRecord($driver, $request, $this->fallbackDefaultTab);
        $this->allTabs = $details['tabs'];
        $this->defaultTab = $details['default'] ? $details['default'] : false;
        $this->backgroundTabs = $manager->getBackgroundTabNames($driver);
    }
 
    /**
     * Get default tab for a given driver
     *
     * @return string
     */
    protected function getDefaultTab()
    {
        // Load default tab if not already retrieved:
        if (null === $this->defaultTab) {
            $this->loadTabDetails();
        }
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php
        $driver = $this->loadRecord();
        $request = $this->getRequest();
        $manager = $this->getRecordTabManager();
        $details = $manager
            ->getTabDetailsForRecord($driver, $request, $this->fallbackDefaultTab);
        $this->allTabs = $details['tabs'];
        $this->defaultTab = $details['default'] ? $details['default'] : false;
        $this->backgroundTabs = $manager->getBackgroundTabNames($driver);
    }
 
    /**
     * Get default tab for a given driver
     *
     * @return string
     */
    protected function getDefaultTab()
    {
        // Load default tab if not already retrieved:
        if (null === $this->defaultTab) {
            $this->loadTabDetails();
        }
        return $this->defaultTab;
    }
 
    /**
     * Get all tab information for a given driver.
     *
     * @return array
     */
    protected function getAllTabs()
    {
        if (null === $this->allTabs) {
            $this->loadTabDetails();
        }
        return $this->allTabs;
    }
 
    /**
     * Get names of tabs to be loaded in the background.
     *
/mnt/monguz/vufind-instances/6.1.2/module/VuFind/src/VuFind/Controller/AbstractRecord.php
        if ($checkRoute && $config->Collections->collections ?? false) {
            $routeConfig = isset($config->Collections->route)
                ? $config->Collections->route->toArray() : [];
            $collectionRoutes
                = array_merge(['record' => 'collection'], $routeConfig);
            $routeName = $this->event->getRouteMatch()->getMatchedRouteName() ?? '';
            if ($collectionRoute = ($collectionRoutes[$routeName] ?? null)) {
                $driver = $this->loadRecord();
                if (true === $driver->tryMethod('isCollection')) {
                    $params = $this->params()->fromQuery()
                        + $this->params()->fromRoute();
                    $collectionUrl = $this->url()
                        ->fromRoute($collectionRoute, $params);
                    return $this->redirect()->toUrl($collectionUrl);
                }
            }
        }
 
        return $this->showTab(
            $this->params()->fromRoute('tab', $this->getDefaultTab())
        );
    }
 
    /**
     * AJAX tab action -- render a tab without surrounding context.
     *
     * @return mixed
     */
    public function ajaxtabAction()
    {
        $this->loadRecord();
        // Set layout to render content only:
        $this->layout()->setTemplate('layout/lightbox');
        return $this->showTab(
            $this->params()->fromPost('tab', $this->getDefaultTab()), true
        );
    }
 
    /**
     * ProcessSave -- store the results of the Save action.
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php
     */
    public function onDispatch(MvcEvent $e)
    {
        $routeMatch = $e->getRouteMatch();
        if (! $routeMatch) {
            /**
             * @todo Determine requirements for when route match is missing.
             *       Potentially allow pulling directly from request metadata?
             */
            throw new Exception\DomainException('Missing route matches; unsure how to retrieve action');
        }
 
        $action = $routeMatch->getParam('action', 'not-found');
        $method = static::getMethodFromAction($action);
 
        if (! method_exists($this, $method)) {
            $method = 'notFoundAction';
        }
 
        $actionResponse = $this->$method();
 
        $e->setResult($actionResponse);
 
        return $actionResponse;
    }
}
 
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        }
 
        if ($this->sharedManager) {
            foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
                $listOfListenersByPriority[$priority][] = $listeners;
            }
        }
 
        // Sort by priority in reverse order
        krsort($listOfListenersByPriority);
 
        // Initial value of stop propagation flag should be false
        $event->stopPropagation(false);
 
        // Execute listeners
        $responses = new ResponseCollection();
        foreach ($listOfListenersByPriority as $listOfListeners) {
            foreach ($listOfListeners as $listeners) {
                foreach ($listeners as $listener) {
                    $response = $listener($event);
                    $responses->push($response);
 
                    // If the event was asked to stop propagating, do so
                    if ($event->propagationIsStopped()) {
                        $responses->setStopped(true);
                        return $responses;
                    }
 
                    // If the result causes our validation callback to return true,
                    // stop propagation
                    if ($callback && $callback($response)) {
                        $responses->setStopped(true);
                        return $responses;
                    }
                }
            }
        }
 
        return $responses;
    }
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
            $event->setParams($argv);
        }
 
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEvent(EventInterface $event)
    {
        return $this->triggerListeners($event);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEventUntil(callable $callback, EventInterface $event)
    {
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function attach($eventName, callable $listener, $priority = 1)
    {
        if (! is_string($eventName)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects a string for the event; received %s',
                __METHOD__,
                (is_object($eventName) ? get_class($eventName) : gettype($eventName))
            ));
        }
 
        $this->events[$eventName][(int) $priority][0][] = $listener;
        return $listener;
    }
 
    /**
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php
     * @events dispatch.pre, dispatch.post
     * @param  Request $request
     * @param  null|Response $response
     * @return Response|mixed
     */
    public function dispatch(Request $request, Response $response = null)
    {
        $this->request = $request;
        if (! $response) {
            $response = new HttpResponse();
        }
        $this->response = $response;
 
        $e = $this->getEvent();
        $e->setName(MvcEvent::EVENT_DISPATCH);
        $e->setRequest($request);
        $e->setResponse($response);
        $e->setTarget($this);
 
        $result = $this->getEventManager()->triggerEventUntil(function ($test) {
            return ($test instanceof Response);
        }, $e);
 
        if ($result->stopped()) {
            return $result->last();
        }
 
        return $e->getResult();
    }
 
    /**
     * Get request object
     *
     * @return Request
     */
    public function getRequest()
    {
        if (! $this->request) {
            $this->request = new HttpRequest();
        }
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/DispatchListener.php
            );
            return $this->complete($return, $e);
        } catch (\Throwable $exception) {
            $return = $this->marshalBadControllerEvent($controllerName, $e, $application, $exception);
            return $this->complete($return, $e);
        } catch (\Exception $exception) {  // @TODO clean up once PHP 7 requirement is enforced
            $return = $this->marshalBadControllerEvent($controllerName, $e, $application, $exception);
            return $this->complete($return, $e);
        }
 
        if ($controller instanceof InjectApplicationEventInterface) {
            $controller->setEvent($e);
        }
 
        $request  = $e->getRequest();
        $response = $application->getResponse();
        $caughtException = null;
 
        try {
            $return = $controller->dispatch($request, $response);
        } catch (\Throwable $ex) {
            $caughtException = $ex;
        } catch (\Exception $ex) {  // @TODO clean up once PHP 7 requirement is enforced
            $caughtException = $ex;
        }
 
        if ($caughtException !== null) {
            $e->setName(MvcEvent::EVENT_DISPATCH_ERROR);
            $e->setError($application::ERROR_EXCEPTION);
            $e->setController($controllerName);
            $e->setControllerClass(get_class($controller));
            $e->setParam('exception', $caughtException);
 
            $return = $application->getEventManager()->triggerEvent($e)->last();
            if (! $return) {
                $return = $e->getResult();
            }
        }
 
        return $this->complete($return, $e);
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
        }
 
        if ($this->sharedManager) {
            foreach ($this->sharedManager->getListeners($this->identifiers, $name) as $priority => $listeners) {
                $listOfListenersByPriority[$priority][] = $listeners;
            }
        }
 
        // Sort by priority in reverse order
        krsort($listOfListenersByPriority);
 
        // Initial value of stop propagation flag should be false
        $event->stopPropagation(false);
 
        // Execute listeners
        $responses = new ResponseCollection();
        foreach ($listOfListenersByPriority as $listOfListeners) {
            foreach ($listOfListeners as $listeners) {
                foreach ($listeners as $listener) {
                    $response = $listener($event);
                    $responses->push($response);
 
                    // If the event was asked to stop propagating, do so
                    if ($event->propagationIsStopped()) {
                        $responses->setStopped(true);
                        return $responses;
                    }
 
                    // If the result causes our validation callback to return true,
                    // stop propagation
                    if ($callback && $callback($response)) {
                        $responses->setStopped(true);
                        return $responses;
                    }
                }
            }
        }
 
        return $responses;
    }
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-eventmanager/src/EventManager.php
            $event->setParams($argv);
        }
 
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEvent(EventInterface $event)
    {
        return $this->triggerListeners($event);
    }
 
    /**
     * @inheritDoc
     */
    public function triggerEventUntil(callable $callback, EventInterface $event)
    {
        return $this->triggerListeners($event, $callback);
    }
 
    /**
     * @inheritDoc
     */
    public function attach($eventName, callable $listener, $priority = 1)
    {
        if (! is_string($eventName)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects a string for the event; received %s',
                __METHOD__,
                (is_object($eventName) ? get_class($eventName) : gettype($eventName))
            ));
        }
 
        $this->events[$eventName][(int) $priority][0][] = $listener;
        return $listener;
    }
 
    /**
/mnt/monguz/vufind-instances/6.1.2/vendor/zendframework/zend-mvc/src/Application.php
            $response = $result->last();
            if ($response instanceof ResponseInterface) {
                $event->setName(MvcEvent::EVENT_FINISH);
                $event->setTarget($this);
                $event->setResponse($response);
                $event->stopPropagation(false); // Clear before triggering
                $events->triggerEvent($event);
                $this->response = $response;
                return $this;
            }
        }
 
        if ($event->getError()) {
            return $this->completeRequest($event);
        }
 
        // Trigger dispatch event
        $event->setName(MvcEvent::EVENT_DISPATCH);
        $event->stopPropagation(false); // Clear before triggering
        $result = $events->triggerEventUntil($shortCircuit, $event);
 
        // Complete response
        $response = $result->last();
        if ($response instanceof ResponseInterface) {
            $event->setName(MvcEvent::EVENT_FINISH);
            $event->setTarget($this);
            $event->setResponse($response);
            $event->stopPropagation(false); // Clear before triggering
            $events->triggerEvent($event);
            $this->response = $response;
            return $this;
        }
 
        $response = $this->response;
        $event->setResponse($response);
        return $this->completeRequest($event);
    }
 
    /**
     * Complete the request
/mnt/monguz/vufind-instances/eles/public/index.php
 
// Ensure vendor/ is on include_path; some PEAR components may not load correctly
// otherwise (i.e. File_MARC may cause a "Cannot redeclare class" error by pulling
// from the shared PEAR directory instead of the local copy):
$pathParts = [];
$pathParts[] = APPLICATION_PATH . '/vendor';
$pathParts[] = get_include_path();
set_include_path(implode(PATH_SEPARATOR, $pathParts));
 
// Composer autoloading
if (file_exists('vendor/autoload.php')) {
    $loader = include 'vendor/autoload.php';
}
 
if (!class_exists('Zend\Loader\AutoloaderFactory')) {
    throw new RuntimeException('Unable to load Zend Framework autoloader.');
}
 
// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();
 

Environment & details:

empty
empty
empty
empty
Key Value
__ZF Array ( [_REQUEST_ACCESS_TIME] => 1711754109,556 [_VALID] => Array ( [Zend\Session\Validator\Id] => sj47it7jopot5dmsl5ntimu8kr ) )
SessionState Zend\Stdlib\ArrayObject Object ( [storage:protected] => Array ( [cookiePath] => / ) [flag:protected] => 2 [iteratorClass:protected] => ArrayIterator [protectedProperties:protected] => Array ( [0] => storage [1] => flag [2] => iteratorClass [3] => protectedProperties ) )
Key Value
REDIRECT_SCRIPT_URL /Record/opac-EUL01-000511383
REDIRECT_SCRIPT_URI https://opac.elte.hu/Record/opac-EUL01-000511383
REDIRECT_VUFIND_ENV development
REDIRECT_VUFIND_LOCAL_DIR /opt/vufind-instances/eles/local
REDIRECT_VUFIND_CACHE_DIR /opt/vufind-instances/eles/local/cache
REDIRECT_VUFIND_APPLICATION_PATH /opt/vufind-instances/eles
REDIRECT_HTTPS on
REDIRECT_SSL_TLS_SNI opac.elte.hu
REDIRECT_STATUS 200
SCRIPT_URL /Record/opac-EUL01-000511383
SCRIPT_URI https://opac.elte.hu/Record/opac-EUL01-000511383
VUFIND_ENV development
VUFIND_LOCAL_DIR /opt/vufind-instances/eles/local
VUFIND_CACHE_DIR /opt/vufind-instances/eles/local/cache
VUFIND_APPLICATION_PATH /opt/vufind-instances/eles
HTTPS on
SSL_TLS_SNI opac.elte.hu
HTTP_ACCEPT */*
HTTP_USER_AGENT claudebot
HTTP_HOST opac.elte.hu
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SERVER_SIGNATURE <address>Apache/2.4.38 (Debian) Server at opac.elte.hu Port 443</address>
SERVER_SOFTWARE Apache/2.4.38 (Debian)
SERVER_NAME opac.elte.hu
SERVER_ADDR 157.181.151.97
SERVER_PORT 443
REMOTE_ADDR 54.224.52.210
DOCUMENT_ROOT /opt/vufind-instances/eles/public
REQUEST_SCHEME https
CONTEXT_PREFIX /
CONTEXT_DOCUMENT_ROOT /opt/vufind-instances/eles/public/
SERVER_ADMIN eltefind@lib.elte.hu
SCRIPT_FILENAME /opt/vufind-instances/eles/public/index.php
REMOTE_PORT 47298
REDIRECT_URL /Record/opac-EUL01-000511383
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /Record/opac-EUL01-000511383
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711754109,5263
REQUEST_TIME 1711754109
empty
0. Whoops\Handler\PrettyPageHandler