This page last changed on Feb 02, 2009 by michal.

Blank Screen on Multi-site Installation

Problem Description:
We've just installed civicrm-drupal-php4.1BETA-rev6742 (highlighted as current version on the civicrm site). I run drupal 4.7.3 in a multi-site installation.

I have placed the civicrm module in my /sites/sitename.co.uk/modules directory, and adjusted civicrm.settings.php accordingly. I have also set up a /sites/sitename.co.co.uk/modules/civicrmfiles directory for the templates_c files etc (as my aim is to have a central codebase for the main civicrm files once it's all working which i symlink to from the sites/sitename.com/modules location, so I want to keep the site specific files separate).

This seems to work ok, and the installation created the templates_c directory, etc. in the right place.

However, I'm just getting a blank main area when I select 'CiviCRM' in my drupal site. Looking at the logs it seems that what is going wrong is that Smarty is trying to copy a file from /tmp to the templates_c directory, and receiving a file error:

rename(/tmp/wrt8I6Kye,/home/httpd/vhosts/sharedcodebase.com/httpdocs/sites/site
name.co.uk/modules/civicrmfiles/templates_c//en_GB/%%DF/DF1/DF14E7A2%%index.tpl
.php): No such file or directory in
/home/httpd/vhosts/sharedcodebase.com/httpdocs/sites/sitename.co.uk/modules/civ
icrm/packages/Smarty/internals/core.write_file.php on line 46.

Solution:
The issue was an open_basedir restriction (with the PHP error being suppressed for some reason), because I am using a drupal multisite installation, with one domain symlinked onto another on my Plesk server. So we have codebase.com domain which is where my drupal and civicrm codebase is stored, and website.co.uk which is one of the sites that are run from the multisite codebase via symlink.

What needed to be done was to create a file called vhost.conf in the conf directory of website.co.uk.

That file should read:

<Directory path/to/website.co.uk/httpdocs>

php_admin_value open_basedir  /path/to/website.co.uk/httpdocs
:/tmp:/path/to/codebase.com/httpdocs/sites/website.co.uk/files

</Directory>

Save this file, then run the following command to make Plesk recognize the changes:
$ /user/local/psa/admin/sbin/websrvmng -a -v

Then do

$ Service httpd restart
Document generated by Confluence on Mar 27, 2009 18:21