Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

InvalidArgumentException: The following arguments are not supported: ttl #2

Closed
WishCow opened this issue Apr 5, 2013 · 7 comments
Closed
Assignees
Labels

Comments

@WishCow
Copy link

WishCow commented Apr 5, 2013

I'm receiving an exception when trying to clear the cache/access my site with the bundle installed. Symfony version is 2.1.7, and the exception happens in vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php line 58.

I would post a stacktrace, but refers to my cached appDevDebugProjectContainer file, which is I believe no use to you.

@mevdschee
Copy link
Contributor

Can you provide the exception and the stacktrace? I need some more information.

@ghost ghost assigned mevdschee Apr 5, 2013
@WishCow
Copy link
Author

WishCow commented Apr 5, 2013

$ php app/console cache:clear -v
Clearing the cache for the dev environment with debug true

[InvalidArgumentException]
The following options are not supported "ttl"

Exception trace:
 () at /srv/http/project/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php:58
 Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler->__construct() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:2256
 appDevDebugProjectContainer__515ee1b03db50__->getMemcache_SessionHandlerService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:3039
 appDevDebugProjectContainer__515ee1b03db50__->getSession_Storage_NativeService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:3013
 appDevDebugProjectContainer__515ee1b03db50__->getSessionService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:1022
 appDevDebugProjectContainer__515ee1b03db50__->getFosFacebook_ApiService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:4381
 appDevDebugProjectContainer__515ee1b03db50__->getSecurity_Authentication_ManagerService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:2670
 appDevDebugProjectContainer__515ee1b03db50__->getSecurity_ContextService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:3839
 appDevDebugProjectContainer__515ee1b03db50__->getTwigService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php:63
 appDevDebugProjectContainer__515ee1b03db50__->getAssetic_AssetManagerService() at /srv/http/project/app/bootstrap.php.cache:211
 Symfony\Component\DependencyInjection\Container->get() at /srv/http/project/vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/CacheWarmer/AssetManagerCacheWarmer.php:33
 Symfony\Bundle\AsseticBundle\CacheWarmer\AssetManagerCacheWarmer->warmUp() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:47
 Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:105
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->warmup() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:75
 Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand->execute() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238
 Symfony\Component\Console\Command\Command->run() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
 Symfony\Component\Console\Application->doRun() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /srv/http/project/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105
 Symfony\Component\Console\Application->run() at /srv/http/project/app/console:22

@mevdschee
Copy link
Contributor

Can you paste me the "lsw_memcache" section from "app/config/config.yml"? It seems you have a placed the "ttl" setting in the wrong place.

@WishCow
Copy link
Author

WishCow commented Apr 5, 2013

I don't have ttl defined, here is the secion:

lsw_memcache:
     session:
         client: session
         prefix: "session_"
     clients:
         session:
             hosts:
               - { dsn: localhost, port: 11211 }

@mevdschee
Copy link
Contributor

I looked into MemcachedSessionHandler.php line 58 in the 2.1.7 tag but i did not see any clues, maybe you can post app/cache/dev_new/appDevDebugProjectContainer__515ee1b03db50__.php line 2250 to 2270

@WishCow
Copy link
Author

WishCow commented Apr 5, 2013

Are you sure you were looking at the correct file?

https://github.com/symfony/symfony/blob/v2.1.7/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php

It does a diff on the received parameters, and if any parameter is not 'prefix', or 'expiretime', it throws.

@mevdschee
Copy link
Contributor

Thank you very much for helping me out. You are completely right.. I fixed this issue in commit dae0578..

mevdschee pushed a commit that referenced this issue Jul 4, 2015
hhvm compatibility try #2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants