couldn't setup xcache by php-fpm config

137 views
Skip to first unread message

NT Man

unread,
Feb 2, 2015, 8:51:09 AM2/2/15
to xca...@googlegroups.com
Hi!

I am try add php_value for configure administration of xcache for each instance.


# cat /etc/php-fpm.d/poligon.conf 
[poligon]
listen.owner = nginx
listen.group = nginx
listen = /var/run/php-fpm/poligon.sock

user = poligon
group = poligon
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
;slowlog = /var/www/mikhail/logs/php-fpm-slow.log
;php_admin_value[error_log] = /var/www/mikhail/logs/php-fpm-error.log
php_admin_flag[log_errors] = on
; Set session path to a directory owned by process user
php_value[session.save_handler] = files
php_value[session.save_path]    = /tmp
php_value[soap.wsdl_cache_dir]  = /tmp
; xCache administration
php_value[xcache.admin.user]    = "poligon"
php_value[xcache.admin.pass]    = "0c51a8dd180d8a3360c88de27057c587"


But this is not work. :( Why?

NT Man

unread,
Feb 2, 2015, 9:09:00 AM2/2/15
to xca...@googlegroups.com
Oh I see several php-fpm instances uses common xcache pool. I didn't expected this. I thought each instance have own memory pool. :(

# ps ax | grep php
11360 ?        Ss     0:00 php-fpm: master process (/etc/php-fpm.conf)
11361 ?        S      0:00 php-fpm: pool crmdev
11362 ?        S      0:00 php-fpm: pool crmdev
11363 ?        S      0:00 php-fpm: pool crmdev
11364 ?        S      0:00 php-fpm: pool crmdev
11365 ?        S      0:00 php-fpm: pool crmdev
11366 ?        S      0:00 php-fpm: pool poligon
11367 ?        S      0:00 php-fpm: pool poligon
11368 ?        S      0:00 php-fpm: pool poligon
11369 ?        S      0:00 php-fpm: pool poligon
11370 ?        S      0:00 php-fpm: pool poligon
11420 pts/2    S+     0:00 grep --color=auto php

Xuefer[mOo]

unread,
Jun 30, 2015, 6:45:12 AM6/30/15
to xca...@googlegroups.com, mikhail.v...@gmail.com
xcache.admin.user/pass is read only for security after php is started. change in ini only. see config.example.php for happy hacking

and i have no idea on how to allow php_value[*] stuff configurable while disallowing ini_set() and .htaccess stuffs

NT Man

unread,
Jun 30, 2015, 10:20:48 AM6/30/15
to xca...@googlegroups.com, mikhail.v...@gmail.com
You can simply calculate token from xcache admin login and password.
Each token is created a separate memory region xcache
Token that can be changed through ini_set () or .htaccess stuffs should not matter, because that is probability accidentally get in someone else's token is minimal.

Xuefer

unread,
Jun 30, 2015, 10:33:38 AM6/30/15
to xca...@googlegroups.com
sorry, there is no plan on supporting vhost admin feature. i doubt if anyone want to pay some credits for implementing it
--

---
You received this message because you are subscribed to the Google Groups "XCache" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xcache+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

NT Man

unread,
Jun 30, 2015, 10:41:03 AM6/30/15
to xca...@googlegroups.com

> sorry, there is no plan on supporting vhost admin feature. i doubt if anyone want to pay some credits for implementing it
 
And how much it would be cost?

Xuefer

unread,
Jun 30, 2015, 1:01:51 PM6/30/15
to xca...@googlegroups.com, mikhail.v...@gmail.com

The token you said is exactly a soft limit namespace is.

It's the user/pass that I'm talking about disallowing setting via INI set, especially htaccess. Otherwide any vhost user can disable the login check.

Good night for now


--
Reply all
Reply to author
Forward
0 new messages