[peruser] PHP opcode caching and chroot

Hannes Landeholm landeholm at gmail.com
Tue Jan 11 08:22:50 MST 2011


I do this/plan to do this with APC. (Thanks for the patches BTW!)

I haven't done any careful testing yet but I don't see the problem of why
APC would not be compatible with chroot. The whole point of chroot is to
keep virtual hosts separate from each other. This should not result in any
duplicate caching of PHP files or additional memory as virtual host B can't
see virtual host A's PHP files and so cannot cache them anyway. Unless you
are have a lot of virtual hosts that are subset of other virtual hosts. But
that would be really odd and you'd probably have to live with the extra
memory then..

Please elaborate on why they wouldn't function properly.

Regards, Hannes

On 11 January 2011 16:14, Andrew <andyukguy at gmail.com> wrote:

> Hi,
> Does anyone have any experience of running peruser + chroot with PHP opcode
> caching software (e.g. eaccelerator, xcache, APC)?
> As you'd expect none of these caching systems are able to see the full path
> of the files they are trying to cache when peruser has chroot enabled. This
> causes them not to function.
> If we chroot as such with peruser:
> Chroot /home/username
> they opcode caching systems only see PHP files as having the path:
> /public_html/path/to/file.php
> Which causes problems in a multi-user system.
> All of the opcode caching systems are compiled as PHP modules. Are there
> any work arounds? Has anyone successfully modified one of the big three
> caching systems to work with peruser and it's chroot system?
> Thanks,
> Andrew
> _______________________________________________
> Peruser mailing list
> Peruser at telana.com
> http://www.telana.com/mailman/listinfo/peruser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.telana.com/pipermail/peruser/attachments/20110111/4d8b9906/attachment.htm>

More information about the Peruser mailing list