Seperate config files for XCache
I've set up 2 php-fcgi processes on my linode for
a) a few smaller domains with little traffic
b) one larger domain
Both are started with spawn-fcgi (I'm using lighttpd on ubuntu). I can easily pass a custom php.ini to php-cgi with the "-c" flag, but for XCache, php looks for the .ini in /etc/php/conf.d which is specified at php compile-time.
One solution would be to remove the lines from conf.d/xcache.ini and move them to the seperate php.ini, but that's not how it's designed and I'm not sure what would happen on updates.
Any ideas?
5 Replies
@burningbunny:
Any ideas?
For what? You never actually said what your problem was. Just that you've set up php-fcgi.
I'm trying to create seperate configuration files for XCache, one for each php-fcgi process. Unfortunately, this isn't as straightforward as passing different php.ini to spawn-fcgi because the xcache.ini is in /etc/php5/conf.d/, which is scanned and appended to php.ini automatically.
@burningbunny:
Oops, should've read that once again before posting.
I'm trying to create seperate configuration files for XCache, one for each php-fcgi process. Unfortunately, this isn't as straightforward as passing different php.ini to spawn-fcgi because the xcache.ini is in /etc/php5/conf.d/, which is scanned and appended to php.ini automatically.
Mind if I ask why? XCache looks to be a standard opcode cacher, it seems like you'd want every spawned PHP process to use the same config/cache. You shouldn't need any special config for this, just configure XCache in the main php.ini file.
You can remove /etc/php5/conf.d/xcache.ini and copy whatever is in there into each site's php.ini file.
I did what hybinet recommended, but with linode's birthday RAM upgrade, all my problems were washed away. Thanks for the help!