eko / docker-symfony

Run a Symfony application using Docker & docker-compose
BSD Zero Clause License
1.29k stars 475 forks source link

SessionHandler not found exception #64

Closed fengdi721 closed 6 years ago

fengdi721 commented 6 years ago

hello, first of all, thanks for your share of this docker environment. I recently encountered a problem when using it with "symfondy demo application"(master). Here enclosed the exception message:

CRITICAL06:26:09 php Fatal Error: Class 'SessionHandler' not found
CRITICAL06:26:09 request Uncaught PHP Exception Symfony\Component\Debug\Exception\ClassNotFoundException: "Attempted to load class "SessionHandler" from the global namespace. Did you forget a "use" statement?" at /var/www/symfony/vendor/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php line 19

Principlely, it's the class "SessionHandler" not exist, i searched quite a while but can't find a solution. Have you encountered the same problem ? thanks in advance

fengdi721 commented 6 years ago

Hello, i confirme this issue is resolved because the session extention not included by default in the image of php 7 (extenion list here: https://pkgs.alpinelinux.org/package/edge/community/x86_64/php7-session), it's strange that session extenion not included in the php image, because it's enabled by default in php normally.

Maxooo commented 6 years ago

This issue is now closed but I think the php7-session component is really needed in most of Symfony projects and should be added.