문제

I am doing some experiments with APCu user data caching in PHP 5.5 through Zend Cache from ZF1, and Apache virtual hosts (with plain vanilla mod-php) and I am getting some unexpected results.

What happens is that data added to the cache from one virtual host become available for reading and writing to other virtual hosts.

I have added a cache prefix for each site and therefore resolved the immediate issue, but I would have expected more isolation between different virtual hosts. Is this the expected behavior? Is there any documentation on this?

도움이 되었습니까?

해결책

As far as I know this has always been the case. There's no authentication with APC (as opposed to, say, MySQL), so no way to securely segregate the data. This is one reason why these tools aren't typically installed on shared hosting.

If you control the server and all the vhosts on it, you've already solved the problem by adding a cache prefix.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top