This page last changed on Apr 27, 2007 by hallman.

Access Denied error when trying to use CiviCRM search.

On some installations, users have reported that some browsers get an "Access Denied" error when trying to run a seach in CiviCRM (Find Contacts).

This is apparently a problem related to virtual paths used in some virtual hosting environments, and a solution that worked for some folks is to change the absolute paths in civicrm.settings.php to relative paths.

— Contributed by Kathy Marks ----------
This is the configuration I got — it should work for anyone with a ROOT DIRECTORY installation of Drupal. In civicrm.settings.php :

Under "File system paths for this install" change:

<?php
global $civicrm_root;


$civicrm_root = '/var/www/htdocs/civicspace/modules/civicrm';

define( 'CIVICRM_TEMPLATE_COMPILEDIR',  '/var/www/htdocs/civicspace/files/civicrm/templates_c');

define( 'CIVICRM_UPLOADDIR', '/var/www/htdocs/civicspace/files/civicrm/upload/');
?>

to:

<?php
global $civicrm_root;

$civicrm_root = './modules/civicrm';

define( 'CIVICRM_TEMPLATE_COMPILEDIR', './files/civicrm/templates_c');

define( 'CIVICRM_UPLOADDIR', './files/civicrm/upload/');
?>

Under "Site URLs" change:

<?php
define( 'CIVICRM_UF_BASEURL', 'http://www.example.com/civicspace/');

define( 'CIVICRM_HTTPBASE', '/civicspace/');

define( 'CIVICRM_RESOURCEBASE', '/civicspace/modules/civicrm/');

define( 'CIVICRM_MAINMENU', '/civicspace/civicrm');
?>

to:

<?php
define( 'CIVICRM_UF_BASEURL', '/');

define( 'CIVICRM_HTTPBASE', '/');

define( 'CIVICRM_RESOURCEBASE', '/modules/civicrm/');

define( 'CIVICRM_MAINMENU', '/civicrm/');
?>
Document generated by Confluence on Mar 27, 2009 18:21