// $Id: INSTALL.txt,v 1.3.2.2 2010-10-31 19:14:51 agentken Exp $ /** * @file * INSTALL file for Domain Prefix */ Domain Access: Table Prefixing Dynamic table prefixing for Domain Access. CONTENTS -------- 1. Introduction 2. Installation 2.1 Option 1 -- Preferred 2.2 Option 2 2.3 Testing Your Configuration 2.4 Additional Resources 3. Reminder 4. Uninstalling ---- 1. Introduction Table prefixing is an advanced Drupal option; it should only be performed by experienced admins or by those willing to learn how table prefixing functions. This module replaces the default $db_prefix routine documented inside settings.php. IT IS ADVISED THAT YOU DO NOT USE THE $db_prefix VARIABLE IF YOU ARE USING THIS MODULE. If you must prefix all tables, do not set $db_prefix as an array. This module should still work if $db_prefix = 'string_'. ---- 2. Installation In the Domain Access download, find the following file: domain > domain_prefix > settings_domain_prefix.inc You will need to load this file from inside your settings.php file. There are normally two methods for this. ---- 2.1 Option 1 -- Preferred This method is preferred, since any updates to the module release will be reflected in this file. NOTE: the elements inside the ==== marks are php code that should be copied into your settings.php file. DO NOT COPY THE ==== MARKS. Add the following lines to the end of your settings.php file: ==== /** * Add the domain_prefix tables */ require_once './path/to/modules/domain/domain_prefix/settings_domain_prefix.inc'; ==== In this case, change 'path/to/modules' with the directory where your modules are stored. Typically this will be 'sites/all/modules', which makes the lines: ==== /** * Add the domain_prefix tables */ require_once './sites/all/modules/domain/domain_prefix/settings_domain_prefix.inc'; ==== ---- 2.2 Option 2 If you are having difficulty determining the correct path, copy the file into your settings folder. domain > domain_prefix > settings_domain_prefix_inc The file should be in the same directory as your active settings.php file. Then add the following lines: ==== /** * Add the domain_prefix tables */ require_once 'settings_domain_prefix.inc'; ==== ---- 2.3 Testing Your Configuration After editing your settings.php file, go to Admin > Build > Domains. If you see a warning at the top of the page beginning: "The Domain Prefix module is not installed correctly..." This message means that your PHP server cannot find the include file. You may need to test other path options for the include code. ---- 2.4 Additional Resources If you are having trouble configuring the module, you should check your PHP include path. You may need to use an absolute path to your server root. http://us3.php.net/manual/en/ini.core.php#ini.include-path ---- 3. Reminder With the Domain Access module, you are running multiple sites from one installation and one settings.php file. The change you make to this file will affect all active domains configured with this module. ---- 4. Uninstalling When you disable this module, you must remove the lines from your settings.php file.