When using webapp-config to install a webapp instance, it will create hardlinks for a vast majority of files (pretty much everything except config files).
In the case of wordpress, this becomes a problem as soon as a second instance is created. Since Wordpress relies on PHP's __FILE__ to include some of its files, two or more instances will end up working as just one, usually the first one used.
Steps to Reproduce:
1. emerge wordpress
2. install two instances using webapp-config and standard settings, in separate hosts dirs
Both separate instances will act as just one
Separate instance should behave independently
The problem can be worked around by making an actual copy of files that use __FILE__, and perhaps by using config-owned permissions on all files.
(In reply to Romain Riviere from comment #0)
> The problem can be worked around by making an actual copy of files that use
> __FILE__, and perhaps by using config-owned permissions on all files.
I'm surprised this hasn't come up before. I also don't think that sym linking vs hard linking (which has been floating around) would make any difference here.
However, looking in php files for uses of __FILE__ is ugly. A more generalizable (and elegant) solution would inlcude an array which list which files are to be copied and which are to be linked. The list could be supplied by the ebuild maintainer on a per webapp basis.
Any other design ideas here?
(In reply to Anthony Basile from comment #1)
I was not suggesting that webapp-config should look for uses of __FILE__ itself, I suppose the ebuild maintainer could do this, as you suggest.
I'm aware the issue still persists, but does this bug need to be open? Maybe it'd be best if the Wordpress ebuild maintainer added a suggestion the Wordpress' post_install() message to install the webapp with the --copy flag enabled. And if they don't have the vhost USE flag enabled to have portage install the webapp with the --copy flag enabled. I'm going to close this as FIXED but I'll contact the maintainer to see if we can't do something about this.
Now that WordPress is auto-updating itself since the 3.8 version, how does it affect the usage of hard-linking by webapp-config?
I would think one of the disable constants need to be used on webapp-config installations http://make.wordpress.org/core/2013/10/25/the-definitive-guide-to-disabling-auto-updates-in-wordpress-3-7/
In short, hard-linking pretty much prevents auto-updates, since webapps source files are owned by root.
Also, the bug is still present. Maybe it could be reopened and re-assigned to wordpress instead?