symfony
symfony forum
Home » legacy support » symfony 1.0 » 1.0 Beta conflict with XCache?
1.0 Beta conflict with XCache? [message #17772] Tue, 12 December 2006 23:13 Go to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
I just upgraded to 1.0 Beta and I'm getting the following errors on some actions:

Fatal error: xcache_count() [<a href='function.xcache-count'>function.xcache-count</a>]: xcache.admin.user and xcache.admin.pass is required in /usr/local/lib/php/symfony/cache/sfProcessCache.class.php on line 104

If I disable XCache everything seems to work fine. Is there somewhere I can set the xcache admin user and password?
Re: 1.0 Beta conflict with XCache? [message #17854 is a reply to message #17772 ] Wed, 13 December 2006 21:23 Go to previous messageGo to next message
fabien  is currently offline fabien
Messages: 484
Registered: October 2005
Faithful Member
Administrator
Do you use sfProcessCache somewhere in your app?
Re: 1.0 Beta conflict with XCache? [message #17863 is a reply to message #17854 ] Thu, 14 December 2006 00:56 Go to previous messageGo to next message
divergent  is currently offline divergent
Messages: 78
Registered: May 2006
Member
Not that I'm aware of - I certainly haven't added it into any actions.
Re: 1.0 Beta conflict with XCache? [message #25650 is a reply to message #17772 ] Fri, 13 April 2007 16:33 Go to previous messageGo to next message
boss  is currently offline boss
Messages: 5
Registered: May 2006
Junior Member
Hi

Try to enter a login & password in your php.ini

[xcache.admin]
xcache.admin.user = "admin"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = "c2272becdcdf2f6782a7034cc4c7464f"

to produce a MD5 password, just run a simple php page with the md5 function :

md5(my_password);

copy and paste, restart apache(or lighttpd) - clear symphony cache : symfony clear-cache

Et voila ! things should be a lot better!
Re: 1.0 Beta conflict with XCache? [message #25707 is a reply to message #17854 ] Sun, 15 April 2007 13:47 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
fabien wrote on Wed, 13 December 2006 21:23

Do you use sfProcessCache somewhere in your app?


Dear Fabien,

i tried XCache, APC and eAccelerator. What i discovered is, when the first hit occure (after symfony cc) there is a call for sfProcessCache::clear() in the checkConfig() method (line 201) of the sfConfigCache class. This happens even when using of ProcessCache is not enabled in the configuration.

All three of them require a user and password setting to use methods for clearing the cache. eAccelerator use ini settings, xCache require authentication. Thats bad, but not symfonys fault. The result is either a php 'warning' (eAccelerator) or the authentication box popup (xCache) when you hit your app the first time.

I helped myself by rewriting the sfProcessCache::clear() and adding few lines. For eAccelerator i'm setting the proper ini settings right before the call of eA's clearing method, and for xCache by setting $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] before calling xcache_clear_cache(). I read those settings out of the app config YAML, where i added them manually.

Hope this helps someone ...

Michael
Re: 1.0 Beta conflict with XCache? [message #26095 is a reply to message #17772 ] Sun, 22 April 2007 07:10 Go to previous messageGo to next message
judas_iscariote  is currently offline judas_iscariote
Messages: 3
Registered: July 2006
Junior Member
a patch has been committed to the Xcache svn branch 1.2 that permits Symfony to work without requiring autentication to be set, now you can set xcache.admin.auth to off, otherwise Synfony will not be able to clear the cache at all, since proper credentials are needed to perform this operation otherwise.
Re: 1.0 Beta conflict with XCache? [message #26145 is a reply to message #17772 ] Mon, 23 April 2007 16:57 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Dear judas_iscariote,

great News and thx for your effort! I tested it already and found a small documentation bug in the message of this changeset:

The setting is not "xcache.admin.auth = Off" but "xcache.admin.enable_auth = Off"

But beside of that it works! THX!

Michael
Re: 1.0 Beta conflict with XCache? [message #35282 is a reply to message #26145 ] Mon, 10 September 2007 23:38 Go to previous message
al_n  is currently offline al_n
Messages: 321
Registered: May 2006
Location: The Netherlands
Faithful Member
michael.piecko wrote on Mon, 23 April 2007 16:57

Dear judas_iscariote,

great News and thx for your effort! I tested it already and found a small documentation bug in the message of this changeset:

The setting is not "xcache.admin.auth = Off" but "xcache.admin.enable_auth = Off"

But beside of that it works! THX!

Michael


This option is available in xcache v1.2.1
Previous Topic:Bug with sfEzComponentsBridge in 1.0.7 release
Next Topic:[resolved] When SF_DEBUG is false Content-Length is null :/
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software