Symfony Exception

ErrorException

HTTP 500 Internal Server Error

file_put_contents(/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php): Failed to open stream: Permission denied

Exception

ErrorException

Show exception properties
ErrorException {#1210
  #severity: E_WARNING
}
  1.      * @param  bool  $lock
  2.      * @return int|bool
  3.      */
  4.     public function put($path$contents$lock false)
  5.     {
  6.         return file_put_contents($path$contents$lock LOCK_EX 0);
  7.     }
  8.     /**
  9.      * Write the contents of a file, replacing it atomically if it already exists.
  10.      *
  1.      * @return callable
  2.      */
  3.     protected function forwardsTo($method)
  4.     {
  5.         return fn (...$arguments) => static::$app
  6.             $this->{$method}(...$arguments)
  7.             : false;
  8.     }
  9.     /**
  10.      * Determine if the error level is a deprecation.
HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'file_put_contents(/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php): Failed to open stream: Permission denied', '/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 204)
  1.      * @param  bool  $lock
  2.      * @return int|bool
  3.      */
  4.     public function put($path$contents$lock false)
  5.     {
  6.         return file_put_contents($path$contents$lock LOCK_EX 0);
  7.     }
  8.     /**
  9.      * Write the contents of a file, replacing it atomically if it already exists.
  10.      *
  1.             $this->ensureCompiledDirectoryExists(
  2.                 $compiledPath $this->getCompiledPath($this->getPath())
  3.             );
  4.             if (! $this->files->exists($compiledPath)) {
  5.                 $this->files->put($compiledPath$contents);
  6.                 return;
  7.             }
  8.             $compiledHash $this->files->hash($compiledPath'xxh128');
  1.         // If this given view has expired, which means it has simply been edited since
  2.         // it was last compiled, we will re-compile the views so we can evaluate a
  3.         // fresh copy of the view. We'll pass the compiler the path of the view.
  4.         if (! isset($this->compiledOrNotExpired[$path]) && $this->compiler->isExpired($path)) {
  5.             $this->compiler->compile($path);
  6.         }
  7.         // Once we have the path to the compiled file, we will evaluate the paths with
  8.         // typical PHP just like any other templates. We also keep a stack of views
  9.         // which have been rendered for right exception messages to be generated.
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each section gets flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(?callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1.         $exception = new Exception($flattenException$request$this->listener$this->basePath);
  2.         $exceptionAsMarkdown $this->viewFactory->make('laravel-exceptions-renderer::markdown', [
  3.             'exception' => $exception,
  4.         ])->render();
  5.         return $this->viewFactory->make('laravel-exceptions-renderer::show', [
  6.             'exception' => $exception,
  7.             'exceptionAsMarkdown' => $exceptionAsMarkdown,
  8.         ])->render();
  1.         try {
  2.             if (config('app.debug')) {
  3.                 if (app()->has(ExceptionRenderer::class)) {
  4.                     return $this->renderExceptionWithCustomRenderer($e);
  5.                 } elseif ($this->container->bound(Renderer::class)) {
  6.                     return $this->container->make(Renderer::class)->render(request(), $e);
  7.                 }
  8.             }
  9.             return $this->renderExceptionWithSymfony($econfig('app.debug'));
  10.         } catch (Throwable $e) {
  1.      * @return \Symfony\Component\HttpFoundation\Response
  2.      */
  3.     protected function convertExceptionToResponse(Throwable $e)
  4.     {
  5.         return new SymfonyResponse(
  6.             $this->renderExceptionContent($e),
  7.             $this->isHttpException($e) ? $e->getStatusCode() : 500,
  8.             $this->isHttpException($e) ? $e->getHeaders() : []
  9.         );
  10.     }
  1.      * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
  2.      */
  3.     protected function prepareResponse($requestThrowable $e)
  4.     {
  5.         if (! $this->isHttpException($e) && config('app.debug')) {
  6.             return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e)->prepare($request);
  7.         }
  8.         if (! $this->isHttpException($e)) {
  9.             $e = new HttpException(500$e->getMessage(), $e);
  10.         }
  1.      */
  2.     protected function renderExceptionResponse($requestThrowable $e)
  3.     {
  4.         return $this->shouldReturnJson($request$e)
  5.             ? $this->prepareJsonResponse($request$e)
  6.             : $this->prepareResponse($request$e);
  7.     }
  8.     /**
  9.      * Convert an authentication exception into a response.
  10.      *
  1.         return $this->finalizeRenderedResponse($request, match (true) {
  2.             $e instanceof HttpResponseException => $e->getResponse(),
  3.             $e instanceof AuthenticationException => $this->unauthenticated($request$e),
  4.             $e instanceof ValidationException => $this->convertValidationExceptionToResponse($e$request),
  5.             default => $this->renderExceptionResponse($request$e),
  6.         }, $e);
  7.     }
  8.     /**
  9.      * Prepare the final, rendered response to be returned to the browser.
  1.      * @param  \Throwable  $e
  2.      * @return void
  3.      */
  4.     protected function renderHttpResponse(Throwable $e)
  5.     {
  6.         $this->getExceptionHandler()->render(static::$app['request'], $e)->send();
  7.     }
  8.     /**
  9.      * Handle the PHP shutdown event.
  10.      *
  1.             if ($exceptionHandlerFailed ?? false) {
  2.                 exit(1);
  3.             }
  4.         } else {
  5.             $this->renderHttpResponse($e);
  6.         }
  7.     }
  8.     /**
  9.      * Render an exception to the console.
  1.      * @return callable
  2.      */
  3.     protected function forwardsTo($method)
  4.     {
  5.         return fn (...$arguments) => static::$app
  6.             $this->{$method}(...$arguments)
  7.             : false;
  8.     }
  9.     /**
  10.      * Determine if the error level is a deprecation.
HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(UnexpectedValueException))

Stack Trace

ErrorException
ErrorException:
file_put_contents(/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php): Failed to open stream: Permission denied

  at /app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:204
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_contents(/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php): Failed to open stream: Permission denied', '/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 204)
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:258)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'file_put_contents(/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php): Failed to open stream: Permission denied', '/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 204)
  at file_put_contents('/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php', '# <?php echo e($exception->class()); ?> - <?php echo $exception->title(); ?><?php echo $exception->message(); ?>PHP <?php echo e(PHP_VERSION); ?>Laravel <?php echo e(app()->version()); ?><?php echo e($exception->request()->httpHost()); ?>## Stack Trace<?php $__currentLoopData = $exception->frames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php echo e($index); ?> - <?php echo e($frame->file()); ?>:<?php echo e($frame->line()); ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>## Request<?php echo e($exception->request()->method()); ?> <?php echo e(\\Illuminate\\Support\\Str::start($exception->request()->path(), \'/\')); ?>## Headers<?php $__empty_1 = true; $__currentLoopData = $exception->requestHeaders(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>* **<?php echo e($key); ?>**: <?php echo $value; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No header data available.<?php endif; ?>## Route Context<?php $__empty_1 = true; $__currentLoopData = $exception->applicationRouteContext(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php echo e($name); ?>: <?php echo $value; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No routing data available.<?php endif; ?>## Route Parameters<?php if($routeParametersContext = $exception->applicationRouteParametersContext()): ?><?php echo $routeParametersContext; ?><?php else: ?>No route parameter data available.<?php endif; ?>## Database Queries<?php $__empty_1 = true; $__currentLoopData = $exception->applicationQueries(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [\'connectionName\' => $connectionName, \'sql\' => $sql, \'time\' => $time]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>* <?php echo e($connectionName); ?> - <?php echo $sql; ?> (<?php echo e($time); ?> ms)<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No database queries detected.<?php endif; ?><?php /**PATH /app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>', 0)
     (/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:204)
  at Illuminate\Filesystem\Filesystem->put('/app/storage/framework/views/19a335aa72912070ff188b3021829d5b.php', '# <?php echo e($exception->class()); ?> - <?php echo $exception->title(); ?><?php echo $exception->message(); ?>PHP <?php echo e(PHP_VERSION); ?>Laravel <?php echo e(app()->version()); ?><?php echo e($exception->request()->httpHost()); ?>## Stack Trace<?php $__currentLoopData = $exception->frames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $frame): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php echo e($index); ?> - <?php echo e($frame->file()); ?>:<?php echo e($frame->line()); ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>## Request<?php echo e($exception->request()->method()); ?> <?php echo e(\\Illuminate\\Support\\Str::start($exception->request()->path(), \'/\')); ?>## Headers<?php $__empty_1 = true; $__currentLoopData = $exception->requestHeaders(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>* **<?php echo e($key); ?>**: <?php echo $value; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No header data available.<?php endif; ?>## Route Context<?php $__empty_1 = true; $__currentLoopData = $exception->applicationRouteContext(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php echo e($name); ?>: <?php echo $value; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No routing data available.<?php endif; ?>## Route Parameters<?php if($routeParametersContext = $exception->applicationRouteParametersContext()): ?><?php echo $routeParametersContext; ?><?php else: ?>No route parameter data available.<?php endif; ?>## Database Queries<?php $__empty_1 = true; $__currentLoopData = $exception->applicationQueries(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as [\'connectionName\' => $connectionName, \'sql\' => $sql, \'time\' => $time]): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>* <?php echo e($connectionName); ?> - <?php echo $sql; ?> (<?php echo e($time); ?> ms)<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>No database queries detected.<?php endif; ?><?php /**PATH /app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>')
     (/app/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php:198)
  at Illuminate\View\Compilers\BladeCompiler->compile('/app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php')
     (/app/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:68)
  at Illuminate\View\Engines\CompilerEngine->get('/app/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'exception' => object(Exception)))
     (/app/vendor/laravel/framework/src/Illuminate/View/View.php:208)
  at Illuminate\View\View->getContents()
     (/app/vendor/laravel/framework/src/Illuminate/View/View.php:191)
  at Illuminate\View\View->renderContents()
     (/app/vendor/laravel/framework/src/Illuminate/View/View.php:160)
  at Illuminate\View\View->render()
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php:95)
  at Illuminate\Foundation\Exceptions\Renderer\Renderer->render(object(Request), object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:880)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent(object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:861)
  at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:840)
  at Illuminate\Foundation\Exceptions\Handler->prepareResponse(object(Request), object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:739)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(object(Request), object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:627)
  at Illuminate\Foundation\Exceptions\Handler->render(object(Request), object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:221)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:198)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(object(UnexpectedValueException))
     (/app/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:258)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(UnexpectedValueException))