Bug #68587 [Opn]: auto_prepend_file breaks Apache2 virtual hosts if same contents
| From: | dante at lorenso dot com | Date: | Thu, 11 Dec 2014 06:18:25 +0000 |
| Subject: | Bug #68587 [Opn]: auto_prepend_file breaks Apache2 virtual hosts if same contents | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189009@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68587&edit=1
ID: 68587
User updated by: dante at lorenso dot com
Reported by: dante at lorenso dot com
Summary: auto_prepend_file breaks Apache2 virtual hosts if
same contents
Status: Open
Type: Bug
Package: Apache2 related
Operating System: Ubuntu 14.04 LTS
PHP Version: 5.5.19
Block user comment: N
Private report: N
New Comment:
No success :\ These setting also DID NOT work...
php_admin_value xcache.readonly_protection On
php_admin_value xcache.mmap_path /tmp/xcache1
php_value auto_prepend_file /www/prod/keydb/public/bootstrap.php
I'm wondering if those tickets:
http://xcache.lighttpd.net/ticket/291
http://xcache.lighttpd.net/ticket/296
Might have been referencing other bugs and maybe the auto_prepend_file is a special case of cache
loading that wasn't addressed?
Unless I can turn XCache ON and not have this problem, it is still a BUG. I can work around the bug
by turning XCache OFF, but that shouldn't be the right answer.
-- Dante
Previous Comments:
------------------------------------------------------------------------
[2014-12-11 05:55:24] dante at lorenso dot com
Default Ubuntu 14.04 xcache settings are in use ... here is the default configuration:
> php -i | grep -i xcache
/etc/php5/cli/conf.d/20-xcache.ini,
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo
XCache
XCache Version => 3.1.0
xcache.coredump_directory => no value => no value
xcache.disable_on_crash => Off => Off
xcache.experimental => Off => Off
xcache.test => Off => Off
XCache Cacher
XCache Cacher Module => enabled
xcache.admin.enable_auth => On => On
xcache.allocator => bestfit => bestfit
xcache.cacher => On => On
xcache.count => 1 => 1
xcache.gc_interval => 0 => 0
xcache.mmap_path => /dev/zero => /dev/zero
xcache.readonly_protection => Off => Off
xcache.shm_scheme => mmap => mmap
xcache.size => 60M => 60M
xcache.slots => 8K => 8K
xcache.stat => On => On
xcache.ttl => 0 => 0
xcache.var_allocator => bestfit => bestfit
xcache.var_count => 1 => 1
xcache.var_gc_interval => 300 => 300
xcache.var_maxttl => 0 => 0
xcache.var_namespace => cheese => cheese
xcache.var_namespace_mode => 1 => 1
xcache.var_size => 4M => 4M
xcache.var_slots => 8K => 8K
xcache.var_ttl => 0 => 0
XCache Coverager
XCache Coverager Module => enabled
xcache.coveragedump_directory => no value => no value
xcache.coverager => Off => Off
xcache.coverager_autostart => On => On
XCache Optimizer
XCache Optimizer Module => enabled
xcache.optimizer => Off => Off
I will play more with some of these settings to see if I can re-enable XCache to work around the
problem.
------------------------------------------------------------------------
[2014-12-11 05:39:36] dante at lorenso dot com
The OPcache is turned on ... but I don't think this is the problem.
opcache.use_cwd On On
This problem is fixed by turning OFF XCache but leaving OPcache unchanged. I tried some attempts to
modify the XCache namespace, but this DID NOT WORK:
<VirtualHost...>
php_admin_value xcache.var_namespace acd
php_value auto_prepend_file /www/dev/acd/public/bootstrap.php
</VirtualHost>
<VirtualHost...>
php_admin_value xcache.var_namespace keydb
php_value auto_prepend_file /www/prod/keydb/public/bootstrap.php
</VirtualHost>
I don't think the var_namespace affected XCache's knowledge of the original file path.
And like I said, changing the contents of the bootstrap.php so that each virtual host had DIFFERENT
data did work. Unfortunately, in these two projects, I'm using the same bootstrap.php from
source control and do not want to force them to be different just to work around the XCache bug.
-- Dante
------------------------------------------------------------------------
[2014-12-11 05:35:59] requinix@php.net
According to
http://xcache.lighttpd.net/ticket/291
http://xcache.lighttpd.net/ticket/296
this problem shouldn't exist in 3.1, which Ubuntu 14.04 and the ondrej PPA have.
As per comment 18 on ticket 296, ReadonlyProtection
http://xcache.lighttpd.net/wiki/ReadonlyProtection
may help, and/or setting xcache.mmap_path to two different locations.
http://xcache.lighttpd.net/wiki/XcacheIni#XCacheCacher
Unfortunately I don't know enough about XCache to offer more than that.
------------------------------------------------------------------------
[2014-12-11 04:57:10] dante at lorenso dot com
Problem resolved by disabling XCache. On Ubuntu 14.04 LTS, the following command was run:
> php5dismod xcache
Then apache2 was restarted, and the problem has gone away. The proper auto_prepend_file is being
loaded from the virtual host now.
To confirm, I run the following command:
> php5enmod xcache
and restart apache. The problem returns.
So, for now, I will leave XCache disabled.
-- Dante
------------------------------------------------------------------------
[2014-12-11 04:47:09] requinix@php.net
Using OPcache? What's the value of opcache.use_cwd? If off, does turning it on fix the problem?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=68587
--
Edit this bug report at https://bugs.php.net/bug.php?id=68587&edit=1