Seperate config files for XCache

Hi-

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.

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.

@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.

Maybe the OP doesn't want one site to be able to access another site's variable cache? Other than that I don't see any obvious benefit of having separate XCache configurations.

You can remove /etc/php5/conf.d/xcache.ini and copy whatever is in there into each site's php.ini file.

I originally needed the setup to limit the size of a specific cache, while keeping another one big.

I did what hybinet recommended, but with linode's birthday RAM upgrade, all my problems were washed away. Thanks for the help!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct