My first suspicion is that this has something to do with Apache configuration, and the wrong VUFIND_HOME/VUFIND_LOCAL_DIR getting passed in. I can’t think of a reason why only themes would misbehave – I would expect everything to go to the wrong place… but maybe the problem is bigger than it looks, and the theme just happens to be the most obvious symptom.


Even though you are not using a single VuFind instance, you may wish to set up both of your instances as multi-site Apache configurations, since part of the purpose of that setting is to avoid environment variable clashes. Make sure your httpd-vufind.conf files are using SetEnvIf with appropriate conditions rather than plain old SetEnv.


If that doesn’t help, let me know and I’ll give it some more thought – but I think this is likely to point you in the right direction.


Good luck!


- Demian


From: Jonathan Jacobsen []
Sent: Wednesday, June 04, 2014 5:59 PM
Subject: [VuFind-General] template issues with multiple VuFind sites on one server


Have any of you successfully configured more than one VuFind 2.x site on the same server? For various reasons, we do NOT want to run a VuFind multisite configuration (as described in the VuFind wiki)  but rather, keep two completely separate codebases for two (and in future, more) different sites. 


We have not had problems doing so with VuFind 1.x, but with VuFind 2.x, the template files in the theme for whatever site is accessed first following an Apache restart is used for all other VuFind 2.x sites. It appears the template determines the base directory for the first site accessed and then uses it for all subsequent site requests. If the specified template is the same for both sites the second started site uses the template from the first and if they specified template name is different, the second site fails to display anything (returning a blank 500 response with the logs recording a “cannot find the specified template” error).


Here’s our configuration:


1.       Ubuntu 13.10

2.       Two (and in future more) sites configured in Apache.

3.     Separate Solr ports, one per site.

4.       Not running SuExec, so each site is running under its respective user (say site1:site1 and site2:site2).

5. is started under the respective site1:site1 or site2:site2 local user and the $VUFIND_HOME environment variable is set in for each site (although we have also tried with setting the path variable explicitly in the user’s .profile/.bashrc so that it is satisfactorily there, and also in the /local/httpd-vufind.conf file, but the issue is not resolved). Running ./ check for each site spits out the correct $VUFIND_HOME and $SOLR_HOME values for each site. Using a phpinfo command in each sites public folder also reports the correct values for each site.

6.       To try to get to the bottom of the actual issue, we’ve tried hard-coding the baseDir path in the ThemeInfo’s constructor, but it continues to access the theme from the other site. Haven’t looked too much into it as not as familiar with the Zend framework, but in Initializer.php the tools object is grabbed via the serviceManager which is perhaps a singleton which, due to some incorrect configuration, leaks across apps?


So in summary, everything about VuFind works fine with 2 separate sites, except for the theme templates, which appears to be getting the baseDir from a cached source instead of the actual $VUFIND_HOME path variable.


Before digging into the source further, we felt it would be best to check in here first. Any suggestions or guidance would be greatly appreciated.


Jonathan Jacobsen, BA, MLIS

Andornot Consulting

1-866-266-2525 x707