Symfony Exception

ContextErrorException

HTTP 500 Internal Server Error

Warning: SessionHandler::read(): open(/home/thevenet/home/http/var/sessions/prod/sess_bu5me2hrf1kporv1kltlqn3ue5, O_RDWR) failed: Permission denied (13)

Exception

Symfony\Component\Debug\Exception\ ContextErrorException

  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     protected function doRead($sessionId)
  5.     {
  6.         return $this->handler->read($sessionId);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
StrictSessionHandler->doRead('bu5me2hrf1kporv1kltlqn3ue5') in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php (line 92)
  1.                 return $prefetchData;
  2.             }
  3.         }
  4.         $data $this->doRead($sessionId);
  5.         $this->newSessionId '' === $data $sessionId null;
  6.         if (\PHP_VERSION_ID 70000) {
  7.             $this->prefetchData $data;
  8.         }
AbstractSessionHandler->read('bu5me2hrf1kporv1kltlqn3ue5') in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php (line 59)
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function read($sessionId)
  5.     {
  6.         return (string) $this->handler->read($sessionId);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
SessionHandlerProxy->read('bu5me2hrf1kporv1kltlqn3ue5')
  1.         if (filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN) && headers_sent($file$line)) {
  2.             throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.'$file$line));
  3.         }
  4.         // ok to try and start the session
  5.         if (!session_start()) {
  6.             throw new \RuntimeException('Failed to start the session');
  7.         }
  8.         $this->loadSession();
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function start()
  5.     {
  6.         return $this->storage->start();
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.      * {@inheritdoc}
  2.      */
  3.     public function hasToken($tokenId)
  4.     {
  5.         if (!$this->session->isStarted()) {
  6.             $this->session->start();
  7.         }
  8.         return $this->session->has($this->namespace.'/'.$tokenId);
  9.     }
SessionTokenStorage->hasToken('https-contactbundle_contact') in vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php (line 72)
  1.      * {@inheritdoc}
  2.      */
  3.     public function getToken($tokenId)
  4.     {
  5.         $namespacedId $this->getNamespace().$tokenId;
  6.         if ($this->storage->hasToken($namespacedId)) {
  7.             $value $this->storage->getToken($namespacedId);
  8.         } else {
  9.             $value $this->generator->generateToken();
  10.             $this->storage->setToken($namespacedId$value);
CsrfTokenManager->getToken('contactbundle_contact') in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php (line 91)
  1.     public function finishView(FormView $viewFormInterface $form, array $options)
  2.     {
  3.         if ($options['csrf_protection'] && !$view->parent && $options['compound']) {
  4.             $factory $form->getConfig()->getFormFactory();
  5.             $tokenId $options['csrf_token_id'] ?: ($form->getName() ?: \get_class($form->getConfig()->getType()->getInnerType()));
  6.             $data = (string) $options['csrf_token_manager']->getToken($tokenId);
  7.             $csrfForm $factory->createNamed($options['csrf_field_name'], 'Symfony\Component\Form\Extension\Core\Type\HiddenType'$data, [
  8.                 'mapped' => false,
  9.             ]);
FormTypeCsrfExtension->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact))) in vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php (line 174)
  1.         $this->innerType->finishView($view$form$options);
  2.         foreach ($this->typeExtensions as $extension) {
  3.             /* @var FormTypeExtensionInterface $extension */
  4.             $extension->finishView($view$form$options);
  5.         }
  6.     }
  7.     /**
  8.      * Returns the configured options resolver used for this type.
ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact))) in vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php (line 167)
  1.      * @param array         $options The options used for the configuration
  2.      */
  3.     public function finishView(FormView $viewFormInterface $form, array $options)
  4.     {
  5.         if (null !== $this->parent) {
  6.             $this->parent->finishView($view$form$options);
  7.         }
  8.         $this->innerType->finishView($view$form$options);
  9.         foreach ($this->typeExtensions as $extension) {
ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact))) in vendor/symfony/symfony/src/Symfony/Component/Form/Form.php (line 1013)
  1.         foreach ($this->children as $name => $child) {
  2.             $view->children[$name] = $child->createView($view);
  3.         }
  4.         $type->finishView($view$this$options);
  5.         return $view;
  6.     }
  7.     /**
Form->createView() in src/ContactBundle/Controller/DefaultController.php (line 79)
  1.             }
  2.         }
  3.         return $this->render('app/contact.html.twig', array(
  4.             'contact' => $contact,
  5.             'form' => $form->createView(),
  6.             'captcha_site_key' => $captcha_site_key
  7.         ));
  8.     }
  9.     private function getCaptchaResponse($response)
DefaultController->contactAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle(object(Request)) in web/app.php (line 23)
  1. $request Request::createFromGlobals();
  2. Request::setTrustedProxies(
  3.     ['192.0.0.1''10.0.0.0/8'],
  4.     Request::HEADER_X_FORWARDED_ALL
  5. );
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $kernel->terminate($request$response);

Logs

No log messages

Stack Trace

ContextErrorException

Symfony\Component\Debug\Exception\ContextErrorException:
Warning: SessionHandler::read(): open(/home/thevenet/home/http/var/sessions/prod/sess_bu5me2hrf1kporv1kltlqn3ue5, O_RDWR) failed: Permission denied (13)

  at vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/StrictSessionHandler.php:48
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler->doRead('bu5me2hrf1kporv1kltlqn3ue5')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/AbstractSessionHandler.php:92)
  at Symfony\Component\HttpFoundation\Session\Storage\Handler\AbstractSessionHandler->read('bu5me2hrf1kporv1kltlqn3ue5')
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Proxy/SessionHandlerProxy.php:59)
  at Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy->read('bu5me2hrf1kporv1kltlqn3ue5')
  at session_start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:145)
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:57)
  at Symfony\Component\HttpFoundation\Session\Session->start()
     (vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php:78)
  at Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage->hasToken('https-contactbundle_contact')
     (vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/CsrfTokenManager.php:72)
  at Symfony\Component\Security\Csrf\CsrfTokenManager->getToken('contactbundle_contact')
     (vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php:91)
  at Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact)))
     (vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php:174)
  at Symfony\Component\Form\ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact)))
     (vendor/symfony/symfony/src/Symfony/Component/Form/ResolvedFormType.php:167)
  at Symfony\Component\Form\ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'translation_domain' => null, 'auto_initialize' => true, 'trim' => true, 'required' => true, 'property_path' => null, 'mapped' => true, 'by_reference' => true, 'inherit_data' => false, 'compound' => true, 'method' => 'POST', 'action' => '', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'error_mapping' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'csrf_message' => 'The CSRF token is invalid. Please try to resubmit the form.', 'csrf_token_manager' => object(CsrfTokenManager), 'csrf_token_id' => null, 'attr' => array(), 'data_class' => 'ContactBundle\\Entity\\Contact', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'upload_max_size_message' => object(Closure), 'validation_groups' => null, 'constraints' => array(), 'data' => object(Contact)))
     (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:1013)
  at Symfony\Component\Form\Form->createView()
     (src/ContactBundle/Controller/DefaultController.php:79)
  at ContactBundle\Controller\DefaultController->contactAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:23)