Skip to end of metadata
Go to start of metadata
CiviCRM Documentation

This page refers to outdated version of CiviCRM. Check current version of documentation.

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/');
?>
Labels
  • None
  1. Jun 03, 2008

    And if I'm in a shared hosting environment, behind a virtual host?

    1. Jun 04, 2008

      Please use the community forums for support - you can search there for answers, and post your specifics if you still need help.


Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.