__VSCODE_LARAVEL_START_OUTPUT__ file_put_contents(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied (500 Internal Server Error)

Symfony Exception

ErrorException

HTTP 500 Internal Server Error

file_put_contents(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied

Exception

ErrorException

Show exception properties
ErrorException {#1361
  #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(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied', '/home/suliseac/demo-pms.sulisea.co.ke/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($e, config('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($request, Throwable $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($request, Throwable $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(Error))

Stack Trace

ErrorException
ErrorException:
file_put_contents(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied

  at /home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:204
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_contents(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied', '/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 204)
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:258)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'file_put_contents(/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.php): Failed to open stream: Permission denied', '/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 204)
  at file_put_contents('/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.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 /home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>', 0)
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:204)
  at Illuminate\Filesystem\Filesystem->put('/home/suliseac/demo-pms.sulisea.co.ke/storage/framework/views/27049ee77ac8401ebb7cd6d819d9faaa.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 /home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php ENDPATH**/ ?>')
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php:199)
  at Illuminate\View\Compilers\BladeCompiler->compile('/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php')
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:68)
  at Illuminate\View\Engines\CompilerEngine->get('/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Providers/../resources/exceptions/renderer/markdown.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'exception' => object(Exception)))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/View/View.php:208)
  at Illuminate\View\View->getContents()
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/View/View.php:191)
  at Illuminate\View\View->renderContents()
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/View/View.php:160)
  at Illuminate\View\View->render()
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Renderer/Renderer.php:95)
  at Illuminate\Foundation\Exceptions\Renderer\Renderer->render(object(Request), object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:879)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent(object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:860)
  at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:839)
  at Illuminate\Foundation\Exceptions\Handler->prepareResponse(object(Request), object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:738)
  at Illuminate\Foundation\Exceptions\Handler->renderExceptionResponse(object(Request), object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:626)
  at Illuminate\Foundation\Exceptions\Handler->render(object(Request), object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:221)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:198)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(object(Error))
     (/home/suliseac/demo-pms.sulisea.co.ke/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:258)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(object(Error))