$line = $this->formatLine($entry); $line .= "\n"; if (!File::append($this->path, $line)) { throw new \RuntimeException('Cannot write to log file.'); } } } /** $this->loggers[$signature] = new $class($this->configurations[$signature]); } // Add the entry to the logger. $this->loggers[$signature]->addEntry(clone $entry); } } /** * Method to find the loggers to use based on priority and category values. if (!($entry instanceof LogEntry)) { $entry = new LogEntry((string) $entry, $priority, $category, $date, $context); } static::$instance->addLogEntry($entry); } /** * Add a logger to the Log instance. Loggers route log entries to the correct files/systems to be logged. * if ($errorNumber === E_USER_DEPRECATED) { Log::add( $errorMessage, Log::WARNING, 'deprecated' ); // If debug mode is enabled, we want to let PHP continue to handle the error; otherwise, we can bail early if (\defined('JDEBUG') && JDEBUG) { * * @author Nicolas Grekas <p@tchwork.com> */ function trigger_deprecation(string $package, string $version, string $message, ...$args): void { @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); }} trigger_deprecation( 'joomla/application', '2.0.0', 'Accessing the input property of %s is deprecated, use the %s::getInput() method instead.', self::class, self::class ); return $this->getInput(); default: { $format = Factory::$document->getType(); } else { $format = $app->input->getString('format', 'html'); } try { $renderer = AbstractRenderer::getRenderer($format); * @since 3.10.0 */ public static function handleException(\Throwable $error) { static::logException($error); static::render($error); } /** * Render the error page based on an exception. * ); // Trigger the onError event. $this->triggerEvent('onError', $event); ExceptionHandler::handleException($event->getError()); } // Send the application response. $this->respond();// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); * define() is used rather than "const" to not error for PHP 5.2 and lower */define('_JEXEC', 1);// Run the application - All executable code should be triggered through this filerequire_once dirname(__FILE__) . '/includes/app.php'; $line = $this->formatLine($entry); $line .= "\n"; if (!File::append($this->path, $line)) { throw new \RuntimeException('Cannot write to log file.'); } } } /** $this->loggers[$signature] = new $class($this->configurations[$signature]); } // Add the entry to the logger. $this->loggers[$signature]->addEntry(clone $entry); } } /** * Method to find the loggers to use based on priority and category values. if (!($entry instanceof LogEntry)) { $entry = new LogEntry((string) $entry, $priority, $category, $date, $context); } static::$instance->addLogEntry($entry); } /** * Add a logger to the Log instance. Loggers route log entries to the correct files/systems to be logged. * if ($errorNumber === E_USER_DEPRECATED) { Log::add( $errorMessage, Log::WARNING, 'deprecated' ); // If debug mode is enabled, we want to let PHP continue to handle the error; otherwise, we can bail early if (\defined('JDEBUG') && JDEBUG) { sprintf( '%1$s() is deprecated. Load the user from the dependency injection container or via %2$s::getApplication()->getIdentity().', __METHOD__, __CLASS__ ), E_USER_DEPRECATED ); $instance = self::getApplication()->getSession()->get('user'); if (\is_null($id)) * * @since 3.2 */ protected function initialiseApp($options = array()) { $user = Factory::getUser(); // If the user is a guest we populate it with the guest user group. if ($user->guest) { $guestUsergroup = ComponentHelper::getParams('com_users')->get('guest_usergroup', 1); * @since 3.2 */ protected function doExecute() { // Initialise the application $this->initialiseApp(); // Mark afterInitialise in the profiler. JDEBUG ? $this->profiler->mark('afterInitialise') : null; // Route the application $this->sanityCheckSystemVariables(); $this->setupLogging(); $this->createExtensionNamespaceMap(); // Perform application routines. $this->doExecute(); // If we have an application document object, render it. if ($this->document instanceof \Joomla\CMS\Document\Document) { // Render the application output.// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); * define() is used rather than "const" to not error for PHP 5.2 and lower */define('_JEXEC', 1);// Run the application - All executable code should be triggered through this filerequire_once dirname(__FILE__) . '/includes/app.php';|
[2/2]
RuntimeException
|
|---|
RuntimeException:
Cannot write to log file.
at /var/www/html/joomla1/libraries/src/Log/Logger/FormattedtextLogger.php:177
at Joomla\CMS\Log\Logger\FormattedtextLogger->addEntry()
(/var/www/html/joomla1/libraries/src/Log/Log.php:367)
at Joomla\CMS\Log\Log->addLogEntry()
(/var/www/html/joomla1/libraries/src/Log/Log.php:175)
at Joomla\CMS\Log\Log::add()
(/var/www/html/joomla1/libraries/src/Exception/ExceptionHandler.php:45)
at Joomla\CMS\Exception\ExceptionHandler::handleUserDeprecatedErrors()
at trigger_error()
(/var/www/html/joomla1/libraries/vendor/symfony/deprecation-contracts/function.php:25)
at trigger_deprecation()
(/var/www/html/joomla1/libraries/vendor/joomla/application/src/AbstractWebApplication.php:225)
at Joomla\Application\AbstractWebApplication->__get()
(/var/www/html/joomla1/libraries/src/Exception/ExceptionHandler.php:111)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/var/www/html/joomla1/libraries/src/Exception/ExceptionHandler.php:71)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/var/www/html/joomla1/libraries/src/Application/CMSApplication.php:311)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/html/joomla1/includes/app.php:63)
at require_once('/var/www/html/joomla1/includes/app.php')
(/var/www/html/joomla1/index.php:32)
|
|
[1/2]
RuntimeException
|
|---|
RuntimeException:
Cannot write to log file.
at /var/www/html/joomla1/libraries/src/Log/Logger/FormattedtextLogger.php:177
at Joomla\CMS\Log\Logger\FormattedtextLogger->addEntry()
(/var/www/html/joomla1/libraries/src/Log/Log.php:367)
at Joomla\CMS\Log\Log->addLogEntry()
(/var/www/html/joomla1/libraries/src/Log/Log.php:175)
at Joomla\CMS\Log\Log::add()
(/var/www/html/joomla1/libraries/src/Exception/ExceptionHandler.php:45)
at Joomla\CMS\Exception\ExceptionHandler::handleUserDeprecatedErrors()
at trigger_error()
(/var/www/html/joomla1/libraries/src/Factory.php:335)
at Joomla\CMS\Factory::getUser()
(/var/www/html/joomla1/libraries/src/Application/SiteApplication.php:621)
at Joomla\CMS\Application\SiteApplication->initialiseApp()
(/var/www/html/joomla1/libraries/src/Application/SiteApplication.php:224)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/var/www/html/joomla1/libraries/src/Application/CMSApplication.php:278)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/html/joomla1/includes/app.php:63)
at require_once('/var/www/html/joomla1/includes/app.php')
(/var/www/html/joomla1/index.php:32)
|