Issue
I injected the services.yml like that
services:
memcache:
class: Memcache
calls:
- [ addServer, [ %session_memcached_host%, %session_memcached_port% ]]
session.handler.memcache:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler
arguments: [@memcache]
and my config.yml
handler_id: session.handler.memcache
and my php.ini
extension="memcache.so"
session.save_handler= memcache
session.save_path= tcp://127.0.0.1:11211
and i installed memcached using this link but the problem when i load fosbundle login page i get this error
Attempted to load class "Memcache" from the global namespace.
Did you forget a "use" statement?
Solution
An easy way to integrate symfony with memcached is to use an existing bundle. I use leaseweb/memcache-bundle and it's super simple - just follow the instructions here: https://github.com/LeaseWeb/LswMemcacheBundle. And remember to start memcached first ;)
Yet to integrate this fully with FOSUserBundle, however it does support php sessions.
Answered By - beterthanlife Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.