Error 500 Internal Server Error

GET http://185.219.242.170/projet1/public/index.php/mon_compte

Forwarded to ErrorController (7158d1)

MonCompteController :: monCompte

Request

GET Parameters

None

POST Parameters

None

Uploaded Files

None

Request Attributes

Key Value
_controller
"App\Controller\MonCompteController::monCompte"
_firewall_context
"security.firewall.map.context.main"
_remove_csp_headers
true
_route
"mon_compte"
_route_params
[]
_security_firewall_run
"_security_main"
_stopwatch_token
"ca3bc0"

Request Headers

Header Value
accept
"*/*"
accept-charset
"utf-8;q=0.7,iso-8859-1;q=0.2,*;q=0.1"
host
"185.219.242.170"
user-agent
"Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)"
x-php-ob-level
"1"

Request Content

Request content not available (it was retrieved as a resource).

Response

Response Headers

Header Value
cache-control
"no-cache, private"
content-type
"text/html; charset=UTF-8"
date
"Sat, 12 Apr 2025 08:11:46 GMT"
vary
"Accept"
x-debug-exception
"Impossible%20to%20access%20an%20attribute%20%28%22role%22%29%20on%20a%20null%20variable."
x-debug-exception-file
"%2Fvar%2Fwww%2Fhtml%2Fprojet1%2Ftemplates%2Futil%2Fsidebar.html.twig:12"
x-debug-token
"96645e"
x-debug-token-link
"http://185.219.242.170/projet1/public/index.php/_profiler/7158d1"
x-previous-debug-token
"7158d1"
x-robots-tag
"noindex"

Cookies

Request Cookies

No request cookies

Response Cookies

No response cookies

Session

Session Metadata

No session metadata

Session Attributes

No session attributes

Session Usage

0 Usages
Stateless check enabled

Session not used.

Flashes

Flashes

No flash messages were created.

Server Parameters

Server Parameters

Defined in .env

Key Value
APP_ENV
"dev"
APP_SECRET
"a74caefc4af1adda9154cc1e3717fead"
DATABASE_URL
"mysql://atima_xplorer:9G9rRf23MeuA8t@10.40.155.30:3306/atima_xplorer?serverVersion=5.7.33"
MESSENGER_TRANSPORT_DSN
"doctrine://default?auto_setup=0"

Defined as regular env variables

Key Value
APP_DEBUG
"1"
CONTEXT_DOCUMENT_ROOT
"/var/www/html"
CONTEXT_PREFIX
""
DOCUMENT_ROOT
"/var/www/html"
GATEWAY_INTERFACE
"CGI/1.1"
HTTP_ACCEPT
"*/*"
HTTP_ACCEPT_CHARSET
"utf-8;q=0.7,iso-8859-1;q=0.2,*;q=0.1"
HTTP_HOST
"185.219.242.170"
HTTP_USER_AGENT
"Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
PATH_INFO
"/mon_compte"
PATH_TRANSLATED
"/var/www/html/mon_compte"
PHP_SELF
"/projet1/public/index.php/mon_compte"
QUERY_STRING
""
REMOTE_ADDR
"216.244.66.232"
REMOTE_PORT
"55596"
REQUEST_METHOD
"GET"
REQUEST_SCHEME
"http"
REQUEST_TIME
1744445506
REQUEST_TIME_FLOAT
1744445506.0659
REQUEST_URI
"/projet1/public/index.php/mon_compte"
SCRIPT_FILENAME
"/var/www/html/projet1/public/index.php"
SCRIPT_NAME
"/projet1/public/index.php"
SCRIPT_URI
"http://185.219.242.170/projet1/public/index.php/mon_compte"
SCRIPT_URL
"/projet1/public/index.php/mon_compte"
SERVER_ADDR
"10.40.155.31"
SERVER_ADMIN
"webmaster@localhost"
SERVER_NAME
"185.219.242.170"
SERVER_PORT
"80"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_SIGNATURE
"<address>Apache/2.4.52 (Ubuntu) Server at 185.219.242.170 Port 80</address>\n"
SERVER_SOFTWARE
"Apache/2.4.52 (Ubuntu)"
SYMFONY_DOTENV_VARS
"APP_ENV,APP_SECRET,DATABASE_URL,MESSENGER_TRANSPORT_DSN"

Sub Requests 1

ErrorController (token = 7158d1)

Key Value
_controller
"error_controller"
_stopwatch_token
"558ed2"
exception
Twig\Error\RuntimeError {#274
  #message: "Impossible to access an attribute ("role") on a null variable."
  #code: 0
  #file: "/var/www/html/projet1/templates/util/sidebar.html.twig"
  #line: 12
  -lineno: 12
  -name: "util/sidebar.html.twig"
  -rawMessage: "Impossible to access an attribute ("role") on a null variable."
  -sourcePath: "/var/www/html/projet1/templates/util/sidebar.html.twig"
  -sourceCode: """
    {#Sidebar intégré dan le fichier base.html.twig#}\r\n
    \r\n
    \r\n
    {#Diviseur de la barr latéral#}\r\n
    <hr class="sidebar-divider">\r\n
    \r\n
    \r\n
    <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar" style="position: relative; top: 2%;">\r\n
    \r\n
    {#Fonction possible par les CREATEUR et les VIEWER#}\r\n
    \r\n
    {% if app.user.role == "CREATEUR" or app.user.role == "VIEWER" %}\r\n
    \r\n
                <!-- Logo Barre Latéral -->\r\n
                <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ path('index') }}" style="position: relative;">\r\n
                    <img src="{{ asset('img/Logo-Atima-Blanc.png') }}" alt="Logo" class="sidebar-brand-image" style="width: 100%; height: auto;">\r\n
                </a>\r\n
    \r\n
                <!-- Diviseur -->\r\n
                <hr class="sidebar-divider my-0">\r\n
    \r\n
                <!-- Tableau de Bord -->\r\n
                <li class="nav-item">\r\n
                    \r\n
                </li>\r\n
    \r\n
                <!-- Diviseur -->\r\n
                <hr class="sidebar-divider">\r\n
    \r\n
                <!--Radiographies-->\r\n
                <div class="sidebar-heading">\r\n
                    Radiographies\r\n
                </div>\r\n
                    \r\n
                    {#Liste des radios#}\r\n
                    <li class="nav-item">\r\n
                        <a class="nav-link" href="{{ path("radio_tableau") }}">\r\n
                            <i class="fa fa-list"></i>\r\n
                            <span>Liste des radiographies</span>\r\n
                        </a>\r\n
                    </li>\r\n
     \r\n
                {#Seul le CREATEUR à accés à cela#}\r\n
                {% if app.user.role == "CREATEUR" %}\r\n
                    <li class="nav-item">\r\n
                        {#Fonction pour uploader une radio#}\r\n
                        <a class="nav-link" href="{{ path('upload_interne', {'id': app.user.getLaClinique.id}) }}">\r\n
                            <i class="fas fa-fw fa-cloud-upload-alt"></i>\r\n
                            <span>Uploader une radiographie</span></a>\r\n
                    </li>\r\n
                    <!-- Diviseur -->\r\n
                    <hr class="sidebar-divider">\r\n
                    \r\n
                    <div class="sidebar-heading">\r\n
                        Comptes\r\n
                    </div>\r\n
    \r\n
                    \r\n
                    <!--Fonction pour creer un compte-->\r\n
                    <li class="nav-item">\r\n
                        <a class="nav-link" href="{{ path('creer_compte_viewer', {'id': app.user.getLaClinique.id}) }}">\r\n
                            <i class="fa fa-user-plus"></i>\r\n
                            <span>Créer Compte Viewer</span></a>\r\n
                    </li>\r\n
                {% endif %}\r\n
    \r\n
                <hr class="sidebar-divider d-none d-md-block">\r\n
                \r\n
                <!-- Diviseur -->\r\n
                <div class="sidebar-heading">\r\n
                    Mon Compte\r\n
                </div>\r\n
    \r\n
                <!--Fonction pour accéder aux infos de son compte-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("mon_compte") }}">\r\n
                        <i class="fa fa-user-circle"></i>\r\n
                        <span>Mon Compte</span></a>\r\n
                </li>\r\n
    \r\n
                \r\n
    \r\n
    \r\n
                <!--Deconnexion-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("app_logout") }}">\r\n
                        <i class="fa fa-power-off"></i>\r\n
                        <span>Déconnexion</span></a>\r\n
                </li>\r\n
    \r\n
                <!-- Bouton pour reduire la sidebar -->\r\n
                <div class="text-center d-none d-md-inline">\r\n
                    <button class="rounded-circle border-0" id="sidebarToggle"></button>\r\n
                </div>\r\n
    \r\n
    \r\n
    \r\n
    \r\n
                <!--Fonction pour l'ADMIn-->\r\n
    {% elseif app.user.role == "ADMIN_ATIMA" %}\r\n
     \r\n
                <!-- Logo Barre latéral -->\r\n
                <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ path('index') }}" style="position: relative;">\r\n
                    <img src="{{ asset('img/Logo-Atima-Blanc.png') }}" alt="Logo" class="sidebar-brand-image" style="width: 100%; height: auto;">\r\n
                </a>\r\n
    \r\n
                <!-- Diviseur -->\r\n
                <hr class="sidebar-divider my-0">\r\n
    \r\n
                <!-- Tableau de Bord -->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path('index') }}">\r\n
                        <i class="fas fa-fw fa-tachometer-alt"></i>\r\n
                        <span>Tableau de Bord</span></a>\r\n
                </li>\r\n
    \r\n
    \r\n
                <!-- Diviseur -->\r\n
                <hr class="sidebar-divider">\r\n
                \r\n
                <!--COMPTES-->\r\n
                <div class="sidebar-heading">\r\n
                    Comptes / Cliniques\r\n
                </div>\r\n
    \r\n
                 <!--Fonction pour creer une clinique-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("new_clinique") }}">\r\n
                        <i class="fas fa-plus"></i>\r\n
                        <span>Créer une clinique</span></a>\r\n
                </li>\r\n
    \r\n
                 <!--Fonction pour voir la liste des utilisateurs-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("tab_compte_client") }}">\r\n
                        <i class="fa fa-list"></i>\r\n
                        <span>Liste des utilisateurs</span></a>\r\n
                </li>\r\n
    \r\n
                 <!--Fonction pour voir la liste des clinique-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("liste_clinique") }}">\r\n
                        <i class="fa fa-list"></i>\r\n
                        <span>Liste des cliniques</span></a>\r\n
                </li>\r\n
                \r\n
                 <!--Diviseur-->\r\n
                <hr class="sidebar-divider d-none d-md-block">\r\n
                \r\n
                <div class="sidebar-heading">\r\n
                    Formats et Modalites\r\n
                </div>\r\n
    \r\n
                 <!--Fonction pour ajouter et voir les formats-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#formats" aria-expanded="true" aria-controls="formats">\r\n
                        <i class="fas fa-file-code"></i>\r\n
                        <span>Formats</span>\r\n
                    </a>\r\n
                    <div id="formats" class="collapse" aria-labelledby="headingUtilities" data-parent="#accordionSidebar">\r\n
                        <div class="bg-white py-2 collapse-inner rounded">\r\n
                            <h6 class="collapse-header">Options de Formats:</h6>\r\n
                            <a class="collapse-item" href="{{ path("creer_format") }}">Ajouter</a>\r\n
                            <a class="collapse-item" href="{{ path("liste_format")}}">Voir la liste</a>\r\n
    \r\n
                        </div>\r\n
                    </div>\r\n
                </li>\r\n
    \r\n
    \r\n
                <!--Fonction pour ajouter et voir les modalites-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#modalites" aria-expanded="true" aria-controls="modalites">\r\n
                        <i class="fas fa-x-ray"></i>\r\n
                        <span>Modalités</span>\r\n
                    </a>\r\n
                    <div id="modalites" class="collapse" aria-labelledby="headingUtilities" data-parent="#accordionSidebar">\r\n
                        <div class="bg-white py-2 collapse-inner rounded">\r\n
                            <h6 class="collapse-header">Options de Modalités : </h6>\r\n
                            <a class="collapse-item" href="{{ path("creer_modalite") }}">Ajouter</a>\r\n
                            <a class="collapse-item" href="{{ path("liste_modalite") }}">Voir la liste</a>\r\n
    \r\n
                        </div>\r\n
                    </div>\r\n
                </li>\r\n
    \r\n
    \r\n
    \r\n
                <!-- Diviseur -->\r\n
                <hr class="sidebar-divider d-none d-md-block">\r\n
    \r\n
                <div class="sidebar-heading">\r\n
                    Mon Compte\r\n
                </div>\r\n
                <!--Fonction pour voir son compte-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("mon_compte") }}">\r\n
                        <i class="fa fa-user-circle"></i>\r\n
                        <span>Mon Compte</span></a>\r\n
                </li>\r\n
    \r\n
                <!--Deconnexion-->\r\n
                <li class="nav-item">\r\n
                    <a class="nav-link" href="{{ path("app_logout") }}">\r\n
                        <i class="fa fa-power-off"></i>\r\n
                        <span>Déconnexion</span></a>\r\n
                </li>\r\n
    \r\n
                <!-- Bouton pour reduire la barre latéral -->\r\n
                <div class="text-center d-none d-md-inline">\r\n
                    <button class="rounded-circle border-0" id="sidebarToggle"></button>\r\n
                </div>\r\n
    \r\n
    {% else %}\r\n
    <div style="color:red">ERREUR : PAS DE ROLE</div>\r\n
    {% endif %}\r\n
    </ul>
    """
  trace: {
    /var/www/html/projet1/templates/util/sidebar.html.twig:12 {
      twig_get_attribute(Environment $env, Source $source, $object, $item, array $arguments = [], $type = 'any', $isDefinedTest = false, $ignoreStrictCheck = false, $sandboxed = false, int $lineno = -1) …
      › \r{% if app.user.role == "CREATEUR" or app.user.role == "VIEWER" %}\r\r
    }
    /var/www/html/projet1/templates/util/sidebar.html.twig:12 {
      __TwigTemplate_fc5e9da9bb285c492fd65f6079a7ac86->doDisplay(array $context, array $blocks = []) …
      › \r{% if app.user.role == "CREATEUR" or app.user.role == "VIEWER" %}\r\r
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:394 {
      Twig\Template->displayWithErrorHandling(array $context, array $blocks = []) …
      › try {    $this->doDisplay($context, $blocks);} catch (Error $e) {
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:367 {
      Twig\Template->display(array $context, array $blocks = []) …
      › {    $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));}
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:379 {
      Twig\Template->render(array $context) …
      › try {    $this->display($context);} catch (\Throwable $e) {
    }
    /var/www/html/projet1/vendor/twig/twig/src/TemplateWrapper.php:38 {
      Twig\TemplateWrapper->render(array $context = []): string …
      › {    return $this->template->render($context);}
    }
    /var/www/html/projet1/vendor/twig/twig/src/Extension/CoreExtension.php:1347 {
      twig_include(Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) …
      › 
      ›     return $loaded ? $loaded->render($variables) : '';} finally {
    }
    /var/www/html/projet1/var/cache/dev/twig/06/0611b6a416e887fd5c4863bc01146d59.php:110 {
      __TwigTemplate_932953854a01bdcdff2a75ff35f19e3a->doDisplay(array $context, array $blocks = []) …
      › echo "            ";echo twig_include($this->env, $context, "util/sidebar.html.twig");echo "
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:394 {
      Twig\Template->displayWithErrorHandling(array $context, array $blocks = []) …
      › try {    $this->doDisplay($context, $blocks);} catch (Error $e) {
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:367 {
      Twig\Template->display(array $context, array $blocks = []) …
      › {    $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));}
    }
    /var/www/html/projet1/var/cache/dev/twig/e2/e29fc55eda1d37ee09cf22690c871195.php:49 {
      __TwigTemplate_9cb47e75f105d142fc7206fad0c6fa52->doDisplay(array $context, array $blocks = []) …
      › $this->parent = $this->loadTemplate("base.html.twig", "mon_compte/card.html.twig", 2);$this->parent->display($context, array_merge($this->blocks, $blocks));}
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:394 {
      Twig\Template->displayWithErrorHandling(array $context, array $blocks = []) …
      › try {    $this->doDisplay($context, $blocks);} catch (Error $e) {
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:367 {
      Twig\Template->display(array $context, array $blocks = []) …
      › {    $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));}
    }
    /var/www/html/projet1/vendor/twig/twig/src/Template.php:379 {
      Twig\Template->render(array $context) …
      › try {    $this->display($context);} catch (\Throwable $e) {
    }
    /var/www/html/projet1/vendor/twig/twig/src/TemplateWrapper.php:38 {
      Twig\TemplateWrapper->render(array $context = []): string …
      › {    return $this->template->render($context);}
    }
    /var/www/html/projet1/vendor/twig/twig/src/Environment.php:280 {
      Twig\Environment->render($name, array $context = []): string …
      › {    return $this->load($name)->render($context);}
    }
    /var/www/html/projet1/vendor/symfony/framework-bundle/Controller/AbstractController.php:243 {
      Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView(string $view, array $parameters = []): string …
      › 
      ›     return $this->container->get('twig')->render($view, $parameters);}
    }
    /var/www/html/projet1/vendor/symfony/framework-bundle/Controller/AbstractController.php:254 {
      Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render(string $view, array $parameters = [], Response $response = null): Response …
      › {    $content = $this->renderView($view, $parameters);    $response ??= new Response();
    }
    /var/www/html/projet1/src/Controller/MonCompteController.php:20 {
      App\Controller\MonCompteController->monCompte(EntityManagerInterface $entityManager) …
      ›     //afficher la page (les infos du utilisateur sont affichés directement dans le twig)     return $this->render('mon_compte/card.html.twig');}
    }
    /var/www/html/projet1/vendor/symfony/http-kernel/HttpKernel.php:181 {
      Symfony\Component\HttpKernel\HttpKernel->handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response …
      › // call controller$response = $controller(...$arguments);}
    /var/www/html/projet1/vendor/symfony/http-kernel/HttpKernel.php:76 {
      Symfony\Component\HttpKernel\HttpKernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
      › try {    return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {
    }
    /var/www/html/projet1/vendor/symfony/http-kernel/Kernel.php:197 {
      Symfony\Component\HttpKernel\Kernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
      › try {    return $this->getHttpKernel()->handle($request, $type, $catch);} finally {
    }
    /var/www/html/projet1/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35 {
      Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run(): int …
      › {    $response = $this->kernel->handle($this->request);    $response->send();
    }
    /var/www/html/projet1/vendor/autoload_runtime.php:29 {
      require_once …
      ›         ->getRunner($app)        ->run());
    }
    /var/www/html/projet1/public/index.php:5 {
      › 
      › require_once dirname(__DIR__).'/vendor/autoload_runtime.php';arguments: {
        "/var/www/html/projet1/vendor/autoload_runtime.php"
      }
    }
  }
}
logger
Symfony\Bridge\Monolog\Logger {#54 …9}