Bridge session data between legacy Application and Symfony2

前端 未结 1 2014
-上瘾入骨i
-上瘾入骨i 2021-01-17 04:14

Sorry if this question has been asked before I could not find it. I couldn\'t find the answer I was looking for.

I have a legacy application that I\'m rebuilding wit

相关标签:
1条回答
  • 2021-01-17 04:50

    What you are looking at there is sample code for the Component that symfony uses. Symfonys session is initialized from parameters set in to app/config.yml. The component instructions are only if you are using the component outside of symfony. The one you want is the first one. However using:

    #app/config.yml
    framework:
        session:
            storage_id: session.storage.php_bridge
            handler_id: session.handler.native_file
    

    Is meant to be used if you are including symfony within your other application where session_start() is being called before symfony is instantiated. I havent tested this but it may still work having them run in parallel but you may end up having to do some customization to the session handler.

    Maybe look into using a pdo session handler: http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html

    0 讨论(0)
提交回复
热议问题