Error 500 Internal Server Error

GET https://dev.tendergpt.uz/lk/password-reset

Exceptions

Failed to start the session: already started by PHP.

Exception

RuntimeException

  1. if ($this->started) {
  2. return true;
  3. }
  4. if (\PHP_SESSION_ACTIVE === session_status()) {
  5. throw new \RuntimeException('Failed to start the session: already started by PHP.');
  6. }
  7. if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOL) && headers_sent($file, $line)) {
  8. throw new \RuntimeException(\sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line));
  9. }
  1. $this->registerBag($flashes);
  2. }
  3. public function start(): bool
  4. {
  5. return $this->storage->start();
  6. }
  7. public function has(string $name): bool
  8. {
  9. return $this->getAttributeBag()->has($name);
  1. public function hasToken(string $tokenId): bool
  2. {
  3. $session = $this->getSession();
  4. if (!$session->isStarted()) {
  5. $session->start();
  6. }
  7. return $session->has($this->namespace.'/'.$tokenId);
  8. }
  1. }
  2. public function getToken(string $tokenId): CsrfToken
  3. {
  4. $namespacedId = $this->getNamespace().$tokenId;
  5. if ($this->storage->hasToken($namespacedId)) {
  6. $value = $this->storage->getToken($namespacedId);
  7. } else {
  8. $value = $this->generator->generateToken();
  9. $this->storage->setToken($namespacedId, $value);
  1. {
  2. if ($options['csrf_protection'] && !$view->parent && $options['compound']) {
  3. $config = $form->getConfig();
  4. $factory = $config->getFormFactory();
  5. $tokenId = $config->getAttribute('csrf_token_id') ?? $this->getCsrfTokenId($config, $options);
  6. $data = (string) $options['csrf_token_manager']->getToken($tokenId);
  7. $csrfForm = $factory->createNamed($options['csrf_field_name'], HiddenType::class, $data, [
  8. 'block_prefix' => 'csrf_token',
  9. 'mapped' => false,
  10. 'attr' => $this->fieldAttr,
in vendor/symfony/form/ResolvedFormType.php -> finishView (line 125)
  1. $this->parent?->finishView($view, $form, $options);
  2. $this->innerType->finishView($view, $form, $options);
  3. foreach ($this->typeExtensions as $extension) {
  4. $extension->finishView($view, $form, $options);
  5. }
  6. }
  7. public function getOptionsResolver(): OptionsResolver
  8. {
  1. $this->proxiedType->buildView($view, $form, $options);
  2. }
  3. public function finishView(FormView $view, FormInterface $form, array $options): void
  4. {
  5. $this->proxiedType->finishView($view, $form, $options);
  6. // Remember which view belongs to which form instance, so that we can
  7. // get the collected data for a view when its form instance is not
  8. // available (e.g. CSRF token)
  9. $this->dataCollector->associateFormWithView($form, $view);
in vendor/symfony/form/ResolvedFormType.php -> finishView (line 120)
  1. }
  2. }
  3. public function finishView(FormView $view, FormInterface $form, array $options): void
  4. {
  5. $this->parent?->finishView($view, $form, $options);
  6. $this->innerType->finishView($view, $form, $options);
  7. foreach ($this->typeExtensions as $extension) {
  8. $extension->finishView($view, $form, $options);
  1. $this->proxiedType->buildView($view, $form, $options);
  2. }
  3. public function finishView(FormView $view, FormInterface $form, array $options): void
  4. {
  5. $this->proxiedType->finishView($view, $form, $options);
  6. // Remember which view belongs to which form instance, so that we can
  7. // get the collected data for a view when its form instance is not
  8. // available (e.g. CSRF token)
  9. $this->dataCollector->associateFormWithView($form, $view);
in vendor/symfony/form/Form.php -> finishView (line 900)
  1. $view->children[$name] = $child->createView($view);
  2. }
  3. $this->sort($view->children);
  4. $type->finishView($view, $this, $options);
  5. return $view;
  6. }
  7. /**
Form->createView() in src/Controller/Auth/ResetController.php (line 51)
  1. $this->addFlash('danger', $this->translator->trans($e->getMessage(), [], 'exceptions'));
  2. }
  3. }
  4. return $this->render('app/auth/reset/request.html.twig', [
  5. 'form' => $form->createView()
  6. ]);
  7. }
  8. #[Route("/password-reset-confirm/{token}", name: "auth.reset.confirm")]
  9. public function confirm(string $token, Request $request, Reset\Reset\Handler $handler): Response
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
Kernel->handle(object(Request)) in public/index.php (line 26)
  1. Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request = Request::createFromGlobals();
  5. $response = $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request, $response);

Logs

Level Channel Message
INFO 21:44:27 php User Deprecated: Class "Doctrine\ORM\Proxy\Autoloader" is deprecated. Use native lazy objects instead. (Autoloader.php:74 called by DoctrineBundle.php:136, https://github.com/doctrine/orm/pull/12005, package doctrine/orm)
{
    "exception": {}
}
INFO 21:44:27 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "6bbb7f"
    },
    "request_uri": "https://dev.tendergpt.uz/lk/_profiler/6bbb7f",
    "method": "GET"
}
INFO 21:44:27 php User Deprecated: Relying on non-optimal defaults for ID generation is deprecated, and IDENTITY results in SERIAL, which is not recommended. Instead, configure identifier generation strategies explicitly through configuration. We currently recommend "SEQUENCE" for "Doctrine\DBAL\Platforms\PostgreSQLPlatform", when using DBAL 3, and "IDENTITY" when using DBAL 4, so you should probably use the following configuration before upgrading to DBAL 4, and remove it after deploying that upgrade: $configuration->setIdentityGenerationPreferences([ "Doctrine\DBAL\Platforms\PostgreSQLPlatform" => ClassMetadata::GENERATOR_TYPE_SEQUENCE, ]); (ClassMetadataFactory.php:639 called by ClassMetadataFactory.php:550, https://github.com/doctrine/orm/issues/8893, package doctrine/orm)
{
    "exception": {}
}

Stack Trace

RuntimeException
RuntimeException:
Failed to start the session: already started by PHP.

  at vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php:112
  at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
     (vendor/symfony/http-foundation/Session/Session.php:59)
  at Symfony\Component\HttpFoundation\Session\Session->start()
     (vendor/symfony/security-csrf/TokenStorage/SessionTokenStorage.php:70)
  at Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage->hasToken('https-form')
     (vendor/symfony/security-csrf/CsrfTokenManager.php:69)
  at Symfony\Component\Security\Csrf\CsrfTokenManager->getToken('form')
     (vendor/symfony/form/Extension/Csrf/Type/FormTypeCsrfExtension.php:79)
  at Symfony\Component\Form\Extension\Csrf\Type\FormTypeCsrfExtension->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), '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', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'App\\Model\\User\\UseCase\\User\\Reset\\Request\\Command', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), '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, 'documentation' => array(), 'data' => object(Command)))
     (vendor/symfony/form/ResolvedFormType.php:125)
  at Symfony\Component\Form\ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), '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', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'App\\Model\\User\\UseCase\\User\\Reset\\Request\\Command', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), '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, 'documentation' => array(), 'data' => object(Command)))
     (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:83)
  at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), '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', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'App\\Model\\User\\UseCase\\User\\Reset\\Request\\Command', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), '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, 'documentation' => array(), 'data' => object(Command)))
     (vendor/symfony/form/ResolvedFormType.php:120)
  at Symfony\Component\Form\ResolvedFormType->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), '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', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'App\\Model\\User\\UseCase\\User\\Reset\\Request\\Command', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), '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, 'documentation' => array(), 'data' => object(Command)))
     (vendor/symfony/form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php:83)
  at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy->finishView(object(FormView), object(Form), array('block_name' => null, 'disabled' => false, 'label' => null, 'label_format' => null, 'label_translation_parameters' => array(), 'attr_translation_parameters' => array(), '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', 'post_max_size_message' => 'The uploaded file was too large. Please try to upload a smaller file.', 'allow_file_upload' => false, 'help_translation_parameters' => array(), 'invalid_message' => 'This value is not valid.', 'invalid_message_parameters' => array(), 'error_mapping' => array(), 'allow_extra_fields' => false, 'extra_fields_message' => 'This form should not contain extra fields.', 'block_prefix' => null, 'row_attr' => array(), 'label_html' => false, 'attr' => array(), 'priority' => 0, 'form_attr' => false, 'data_class' => 'App\\Model\\User\\UseCase\\User\\Reset\\Request\\Command', 'empty_data' => object(Closure), 'error_bubbling' => true, 'label_attr' => array(), 'action' => '', 'upload_max_size_message' => object(Closure), 'help' => null, 'help_attr' => array(), 'help_html' => false, 'is_empty_callback' => null, 'getter' => null, 'setter' => null, 'validation_groups' => null, 'constraints' => array(), '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, 'documentation' => array(), 'data' => object(Command)))
     (vendor/symfony/form/Form.php:900)
  at Symfony\Component\Form\Form->createView()
     (src/Controller/Auth/ResetController.php:51)
  at App\Controller\Auth\ResetController->request(object(Request), object(Handler))
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:26)