[Mapbender-users] Fwd: Installation issues + Uncaught PHP Exception Twig\Error\RuntimeError (code 0)

Thorsten Hack (WhereGroup) thorsten.hack at wheregroup.com
Wed May 22 08:17:33 PDT 2024


Hi Norbert,

it looks like the symfony framework has troubles creating the session 
for the user running PHP.

Hopefully the answers presented in one of these threads can help you:

- 
https://stackoverflow.com/questions/39980171/symfony-3-1-5-warning-sessionhandlerread-session-data-file-is-not-created
- 
https://stackoverflow.com/questions/41771425/session-start-session-data-file-is-not-created-by-your-uid

Good luck and best regards,

Thorsten Hack


***********************************************************
FOSS Academy Sommerschule: Kompaktkurs zum Aufbau einer GDI
02.-06. September 2024, Präsenzveranstaltung in Bonn
https://www.foss-academy.com/kompaktkurse
***********************************************************

WhereGroup GmbH
Schwimmbadstr. 2
79100 Freiburg
Germany

Tel.: +49 (0)761 / 519 102 - 67
Fax: +49 (0)761 / 519 102 - 11

thorsten.hack at wheregroup.com
www.wheregroup.com

Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885




Am 22.05.24 um 14:32 schrieb Norbert Farago via Mapbender_users:
> Hi,
>
> Thank you Thorsten, I have just tried what  you suggested to Fabio in 
> another thread recently (commenting lines 11 to 17), and now the 
> app_dev.php started to immediately stop with "Warning: 
> SessionHandler::read() Session data file is not created by your 
> uid". (vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php 
> line59)
>
> Norbert
>
> Norbert Farago <norbert.farago at gmail.com> ezt írta (időpont: 2024. 
> máj. 21., K, 12:04):
>
>     Hi Connor, hi Astrid,
>
>     thank you for the responses! I am using (or intend to use) the
>     latest version of Mapbender (3.3.5), so Symfony is 4.4.50.
>     Unfortunately, the app_dev.php does not work, ("You are not
>     allowed to access this file. Check app_dev.php for more
>     information"), so you will be right, it is something wrong with
>     access rights. App_console is also not allowed to be used,
>     ("Warning: shell_exec() has been disabled for security reasons,
>     ConfigCheckCommand.php line 201"), and the system administrators
>     will not permit me to run this shell function.
>
>     The main problem is the virtual server I got is configured under
>     Andrew File System (AFS), so granting ordinary Unix/Linux write
>     access is not satisfactory, it had to be configured according to
>     the AFS permissions. Moreover, there is no www-data user in this
>     environment, instead, a special user and a Kerberos ticket are
>     given to me every time I want to run a php script. This user has
>     the necessary read, list and write permissions on the Mapbender
>     folders you mentioned. I also gave it a try to grant read, list
>     and write permission to service.web, as an installation guide to
>     Drupal written by the same administrators suggested to, but
>     it does not help.
>     I also checked whether php is running, but there is no problem, my
>     simple php scripts are OK.
>
>     So, the question remains, does anyone have experience with
>     Mapbender under AFS, and what other access rights should I set or
>     obtain?
>
>     Best
>     Norbert
>
>     Astrid Emde (WhereGroup) via Mapbender_users
>     <mapbender_users at lists.osgeo.org> ezt írta (időpont: 2024. máj.
>     17., P, 12:57):
>
>         Hello Norbert,
>
>         as Connor mentioned you should try the app_dev.php developer
>         modus? It
>         will give you extra information.
>
>         http://localhost/mapbender/app_dev.php
>
>         You can also check on the console whether everything is fine
>
>         cd mapbender
>         app/console mapbender:config:check
>
>         Best regards Astrid
>
>         Am 2024-05-17 12:01, schrieb Härtel:
>         > Hi Norbert,
>         >
>         > which version of symfony are you using? The error of the session
>         > failing to start seems to occur in the class
>         >
>         “vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php”
>         > (line 193), I suspect during the call to the start()
>         function, which
>         > eventually calls the php function “session_start()”.
>         >
>         > You can check the source code on your system yourself for
>         the real
>         > cause, though.
>         >
>         > It is possible, that the error is caused by missing write
>         permissions
>         > on the directory or sub-directories of app/cache/ or var/cache/,
>         > depending on your Symfony version.
>         >
>         > You can also try to call the app_dev.php instead of app.php,
>         maybe the
>         > logs for dev environment give you another indication of what is
>         > causing the error.
>         >
>         > Best regards,
>         >
>         > Connor
>         >
>         > Von: Mapbender_users
>         <mapbender_users-bounces at lists.osgeo.org> Im
>         > Auftrag von Norbert Farago via Mapbender_users
>         > Gesendet: Donnerstag, 16. Mai 2024 10:23
>         > An: mapbender_users at lists.osgeo.org
>         > Cc: Norbert Farago <norbert.farago at gmail.com>
>         > Betreff: [Mapbender-users] Fwd: Installation issues +
>         Uncaught PHP
>         > Exception Twig\Error\RuntimeError (code 0)
>         >
>         > Dear Mapbender Team,
>         >
>         > last week I asked for a little help on the mail list, but
>         > unfortunately, I didn't get a response until now. Since
>         then, together
>         > with the administrators, we solved the .htaccess and Apache
>         problems,
>         > but the ones with code 0 remained. I copied here the error
>         lines from
>         > prod.log, I am sure it will provide some extra hint for you
>         > (definitely it did not for me).
>         >
>         > [2024-05-15 23:12:52] request.INFO: Matched route
>         "mapbender_start".
>         >
>         {"route":"mapbender_start","route_parameters":{"_route":"mapbender_start","_controller":"Mapbender\\CoreBundle\\Controller\\WelcomeController::listAction"},"request_uri":"https://(...)/","method":"GET"}
>         > []
>         >
>         > [2024-05-15 23:12:52] security.INFO: Populated the
>         TokenStorage with
>         > an anonymous Token. [] []
>         >
>         > [2024-05-15 23:12:54] request.CRITICAL: Uncaught PHP Exception
>         > Twig\Error\RuntimeError: "An exception has been thrown
>         during the
>         > rendering of a template ("Failed to start the session.")." at
>         >
>         /afs/(...)/mapbender/mapbender/src/Mapbender/ManagerBundle/Resources/views/manager.html.twig
>         > line 19 {"exception":"[object]
>         (Twig\\Error\\RuntimeError(code: 0): An
>         > exception has been thrown during the rendering of a template
>         (\"Failed
>         > to start the session.\"). at
>         >
>         /afs/(...)/mapbender/mapbender/src/Mapbender/ManagerBundle/Resources/views/manager.html.twig:19,
>         > RuntimeException(code: 0): Failed to start the session. at
>         >
>         /afs/(...)/mapbender/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:193)"}
>         > []
>         >
>         > [2024-05-15 23:12:55] request.ERROR: Uncaught PHP Exception
>         >
>         Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No
>         > route found for "GET /favicon.ico" (from "https://(...)")" at
>         >
>         /afs/(...)/mapbender/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php
>         > line 136 {"exception":"[object]
>         >
>         (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code:
>         > 0): No route found for \"GET /favicon.ico\" (from
>         \"https://(....)")
>         > at
>         >
>         /afs/(...)/mapbender/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:136,
>         >
>         Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException(code:
>         > 0): No routes found for \"/favicon.ico/\". at
>         >
>         /afs/(...)/mapbender/vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/Dumper/CompiledUrlMatcherTrait.php:70)"}
>         > []
>         >
>         > Thank you in advance!
>         >
>         > Best
>         >
>         > Norbert Faragó
>         > _______________________________________________
>         > Mapbender_users mailing list
>         > Mapbender_users at lists.osgeo.org
>         > https://lists.osgeo.org/mailman/listinfo/mapbender_users
>
>         -- 
>         Mit freundlichen Grüßen
>
>         Astrid Emde
>         GIS-Consultant
>
>         **********************************
>
>         Aufwind durch Wissen!
>         Web-Seminare und Online-Schulungen
>         bei der www.foss-academy.com <http://www.foss-academy.com>
>
>         **********************************
>
>
>            Astrid Emde
>            WhereGroup GmbH
>            Eifelstraße 7
>            53119 Bonn
>            Germany
>
>            Tel: +49(0)228 90 90 38 - 22
>            Fax: +49(0)228 90 90 38 - 11
>
>         astrid.emde at wheregroup.com
>         www.wheregroup.com <http://www.wheregroup.com>
>
>            Meinen PGP Public-Key können Sie unter pgp.mit.edu
>         <http://pgp.mit.edu> herunterladen:
>
>         https://keys.openpgp.org/vks/v1/by-fingerprint/01F8152D36FC07C25EADDE86C5084ACC1C287CCB
>            Signierte und/oder verschlüsselte Nachrichten sind sehr
>         willkommen
>
>            Folgen Sie der WhereGroup auf twitter:
>         http://twitter.com/WhereGroup_com
>
>            Geschäftsführer:
>            Olaf Knopp, Peter Stamm
>            Amtsgericht Bonn, HRB 9885
>         -------------------------------_______________________________________________
>         Mapbender_users mailing list
>         Mapbender_users at lists.osgeo.org
>         https://lists.osgeo.org/mailman/listinfo/mapbender_users
>
>
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapbender_users

-- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20240522/df48e705/attachment-0001.htm>


More information about the Mapbender_users mailing list