Drupal

  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home1/draperfa/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/draperfa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home1/draperfa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 0.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home1/draperfa/public_html/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 0.
  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /home1/draperfa/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home1/draperfa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home1/draperfa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 0.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /home1/draperfa/public_html/gallery2_core/embed.php on line 32.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryEmbed::getEmbedPathByHttpRequest() should not be called statically in /home1/draperfa/public_html/gallery2_core/embed.php on line 36.
  • strict warning: Non-static method GalleryUtilities::getRequestVariablesNoPrefix() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 1092.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 289.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 293.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryEmbed::init() should not be called statically in /home1/draperfa/public_html/sites/all/modules/gallery/gallery_base.inc on line 134.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 94.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 46.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 47.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 48.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 49.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryModule.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 55.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryPlatform/UnixPlatform.class on line 21.
  • strict warning: Non-static method GalleryUtilities::getRequestVariables() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 150.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 242.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 246.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 152.
  • strict warning: Non-static method GalleryTranslator::getSupportedLanguageCode() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 154.
  • strict warning: Non-static method GalleryTranslator::getLanguageData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryTranslator.class on line 414.
  • strict warning: Non-static method GalleryUtilities::strToUpper() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryTranslator.class on line 418.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 103.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryEmbed::isCompatibleWithEmbedApi() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 107.
  • strict warning: Non-static method GalleryEmbed::getApiVersion() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 61.
  • strict warning: Non-static method GalleryUtilities::isCompatibleWithApi() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 61.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 128.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: call_user_func() expects parameter 1 to be a valid callback, non-static method RewriteSimpleHelper::loadItemIdFromPath() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/rewrite/classes/RewriteUrlGenerator.class on line 103.
  • strict warning: Non-static method GalleryUtilities::getRequestVariables() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/rewrite/classes/RewriteSimpleHelper.class on line 38.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 242.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::_getRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 242.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 875.
  • strict warning: Non-static method GalleryUtilities::_internalGetRequestVariable() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 879.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 246.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 708.
  • strict warning: Non-static method GalleryUtilities::sanitizeInputValues() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUtilities.class on line 714.
  • strict warning: Non-static method GalleryCoreApi::getAllFactoryImplementationIds() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 179.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 187.
  • strict warning: Non-static method GalleryFactoryHelper_simple::getAllImplementationIds() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 188.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 213.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryCoreApi::newFactoryInstanceById() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 186.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 174.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstanceById() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 175.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 191.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstance() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 201.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 141.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryCoreApi::newFactoryInstanceById() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 186.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 174.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstanceById() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 175.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 191.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryFactoryHelper_simple::newInstance() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 201.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getFactoryData() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 141.
  • strict warning: Non-static method GalleryFactoryHelper_simple::_getSingleton() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 63.
  • strict warning: Non-static method GalleryCoreApi::getCodeBasePath() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 169.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryFactoryHelper_simple.class on line 175.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/httpauth/classes/HttpAuthPlugin.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::getAnonymousUserId() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 203.
  • strict warning: Non-static method GalleryCoreApi::getPluginParameter() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 3078.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 300.
  • strict warning: Non-static method GalleryPluginHelper_simple::getParameter() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 302.
  • strict warning: Non-static method GalleryPluginHelper_simple::_fetchAllParameters() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 222.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 281.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::get() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryPluginHelper_simple.class on line 282.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 186.
  • strict warning: Non-static method GalleryCoreApi::loadEntitiesById() should not be called statically in /home1/draperfa/public_html/gallery2_core/init.inc on line 208.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 2360.
  • strict warning: Non-static method GalleryEntityHelper_simple::loadEntitiesById() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryCoreApi.class on line 2361.
  • strict warning: Non-static method GalleryDataCache::containsKey() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 53.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 203.
  • strict warning: Non-static method GalleryDataCache::getFromDisk() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 56.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 273.
  • strict warning: Non-static method GalleryDataCache::getCachePath() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 280.
  • strict warning: Non-static method GalleryDataCache::getCacheTuple() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 405.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 287.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUser.class on line 21.
  • strict warning: Non-static method GalleryCoreApi::requireOnce() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEntity.class on line 21.
  • strict warning: Declaration of GalleryUser::create() should be compatible with GalleryEntity::create() in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUser.class on line 42.
  • strict warning: Declaration of GalleryUser::save() should be compatible with GalleryEntity::save($postEvent = true, $setAclId = NULL) in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryUser.class on line 42.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 95.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryUtilities::isA() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/helpers/GalleryEntityHelper_simple.class on line 118.
  • strict warning: Non-static method GalleryDataCache::put() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryEmbed.class on line 133.
  • strict warning: Non-static method GalleryDataCache::_getCache() should not be called statically in /home1/draperfa/public_html/gallery2_core/modules/core/classes/GalleryDataCache.class on line 85.
  • strict warning: Non-static method GalleryCoreApi::getMapEntry() should not be called statically in /home1/draperfa/public_html/sites/all/modules/gallery/gallery_user.inc on line 616.
  • warning: mysqli_real_connect(): (42000/1044): Access denied for user 'draperfa_draper'@'localhost' to database 'draperfa_dratekgallery2' in /home1/draperfa/public_html/gallery2_core/lib/adodb/drivers/adodb-mysqli.inc.php on line 109.
  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • strict warning: Non-static method view::load() should not be called statically in /home1/draperfa/public_html/sites/all/modules/views/views.module on line 906.
  • warning: Creating default object from empty value in /home1/draperfa/public_html/sites/all/modules/mailhandler/mailhandler.module on line 123.

Private Groups

The following post is about my attempts at setting up a private group on a website.  It is put here more for my reference, but if anyone finds it helpful, then that is all the better.

 

Setting up a Drupal multisite environment locally using XAMPP for Windows

I have a tutorial up on setting up Drupal for a multisite configuration on a host server.  Here, I will attempt to chronicle my steps for setting up a local multisite configuration using XAMPP on Windows XP Pro.  There is a really good tutorial at http://neemtree.com.au/developing-drupal-using-xampp which I recommend, but sometimes I just need to work through the steps myself.  If anyone else finds this useful, then that's an added bonus!

Install XAMPP

First, you need to get XAMPP installed and verify that it is working.  Download XAMPP from http://www.apachefriends.org/en/xampp.html (note that I go with the full version, but XAMPP Lite should work also.)  I'd recommend getting the .exe installer version, unless you are comfortable setting up the files in the .zip (it's really not that bad...)  I am going to assume that xampp is located in c:\xampp, but you can put it anywhere, just keep that in mind as you follow the tutorial.  Once you have it installed, open the XAMPP control panel and start Apache and MySQL.  You can then open a browser and enter http://localhost, which should bring up a page that looks like this:

Create a database for your sites

Navigate to http://localhost/phpmyadmin and create a new database for each of your sites.  For this tutorial, we will use the following databases: demo_multisite1, demo_multisite2, demo_multisite3.  You should also give each database a username and password, but for the sake of this tutorial, we'll just stick with the default 'root' and 'no password'.

Install Drupal

For the purposes of our tutorial, let's say that the default site is 'multisite1' and then we want to add a couple of other sites, 'multisite2' and 'multisite3'.  Create a folder in c:\xampp\htdocs called 'multisite1'.  Copy the latest Drupal core files to c:\xampp\htdocs\multisite1.  At this point, you can install the default site as per usual (note that the sites/default directory will be used for this site.)  Use the database demo_multisite1 for this site.

Tell Windows and Apache about the multiple sites

At this point, you should be able to go to http://localhost/multisite1 and view your new site.  Now, we need to make some changes so that you can access the sub-sites (this is needed before you can install them.)

Open your Windows 'hosts' file in a text editor.  This is typically in <WINDOWS_FOLDER>/system32/drivers/etc/hosts.  By default, this will probably be entirely commented out, but have examples on how to modify it.  What you need to do is go to the bottom and add the following lines:

127.0.0.1 multisite1
127.0.0.1 multisite2
127.0.0.1 multisite3

What this does is make Windows realize that these sites exist on the computer, so you will be able to simply browse to http://multisite1, http://multisite2, or http://multisite3.

To tell Apache about the multiple sites, edit httpd-vhosts.conf file, which should be located in c:/xampp/apache/conf/extra.  I think most other apache distributions have a similar file structure, but you can always use the Windows file search to find it.  Edit this file in any text editor by adding the following at the end of the file:

NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/multisite1"
    ServerName multisite1
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/multisite1"
    ServerName multisite2
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/multisite1"
    ServerName multisite3
</VirtualHost>

I'll explain a bit about what's going on.  The first VirtualHost entry ensures that when we go to http://localhost, we still get the XAMPP front page (if we left that out, we would end up getting our multisite1 page.)  The following 3 VirtualHost entries tell apache that the site is located in C:/xampp/htdocs/multisite1 (our default site) and that the server name is multisite1, multisite2, or multisite3.  This means, that when we enter http://multisite2, for instance, it will look for the data in C:/xampp/htdocs/multisite1, but Drupal will pull up the appropriate site based on the server name.  This will be taken care of soon (right now, it will still bring up multisite1.)

One last modification we may need to make is to insure that Apache is using virtual hosts, and to enable clean urls.  To do this, open the Apache httpd.conf file in a text editor.  This will be located in c:/xampp/apache/conf.  Search for the following line:

LoadModule rewrite_module modules/mod_rewrite.so

If there is a '#' at the beginning of the line, remove it to uncomment the command.  Next, find the following:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

and make sure that the include is not commented.  If it doesn't exist at all in the file, add it at the end.

Restart Apache to load the new settings.

Create directories for the sub-sites

Navigate to c:/xampp/htdocs/multisite1/sites and create the directories 'multisite2' and 'multisite3'.  You could also simply copy the default directory and rename it accordingly.  If you choose to create new directories, be sure to copy the default-settings.php file to each directory and rename it to settings.php.

Install the sub-sites

In an open browser, navigate to http://multisite2 (or http://multisite2/install.php) to begin installation of multisite2.  The installation procedure will be basically the same as when you installed multisite1.  Repeat for any additional sites (e.g. multisite3.)

Enjoy your multisite setup

You can now use your various sites, using a single codebase of Drupal.

Installing Drupal in a Multi-Site Configuration

Introduction

I had been running two sites, http://www.dratek.com and http://www.draperfarms.com, on separate servers.  I finally moved dratek.com to the draperfarms.com server so I wouldn't need to pay double hosting costs, but I was still using separate Drupal and Gallery2 installations.  It didn't take long for this to become a nuisance, as anytime an update was needed, it meant having to perform it for each site.  Fortunately, Drupal and Gallery2 both support multi-site installations, so all sites can share a common code base.

Drupal Multi-Site Installation

First, I'll cover how to install Drupal for a multi-site configuration.  Drupal documentation and a number of other sites discuss setting up a multi-site installation, but for the most part, these are all fresh installs.  Since I already had the sites running, I wanted to keep my existing data (granted, there wasn't much, so losing it wouldn't have been too catastrophic.)  For the purposes of this tutorial, I will refer to the default site, draperfarms.com, as domain1, and my new site, dratek.com, as domain2.

Important First Steps!!!

Whenever doing something like this, it is important to make backups of your databases.  One wrong move and you could lose everything!

Prepare The New Site

When I first added dratek.com to draperfarms.com, CPanel created a 'dratek' directory in the public_html directory.  The first thing I did was to rename this to dratek_old in order to avoid conflicts or losing data.  Next, login via SSH using something like PuTTY and navigate to the public_html directory.  Enter 'ln -s . domain2' (where domain2 is the name of your new site) to create a symbolic link from http://www.domain2.com.  At this point, going to http://www.domain2.com will be the same as going to http://www.domain1.com, but we'll fix that soon.

Tell Drupal About The New Site

In the Drupal 'sites' directory, create a directory for your new site named 'domain2.com' (in my case, dratek.com) and copy the default.settings.php file here.  There should already be a sites/all directory, which applies to ALL of your sites, as well as a 'default' directory which applies to domain1.com.  Rename the domain2.com/default.settings.php file to domain2.com/settings.php and edit it as necessary.  For instance, you may need to set the database connection string, or edit the database table prefix if using a shared database.

Since I already had dratek.com running with its own Drupal installation, I copied its 'files' folder to the 'sites/dratek.com' folder.  I also carefully copied the modules and themes.  When doing this, it is important to place them in the appropriate directory: if they should be accessible to all sites, place them in 'sites/all', if they should only be accessible to domain2, then put them in 'sites/domain2.com'.

Once the necessary themes and modules were available, I was able to access dratek.com in the multi-site installation, since I was using my existing database.  If you are setting up a new site, you will need to run the drupal installation script and be sure to select the multi-site configuration.

Gallery2 Multi-Site

I use Gallery2 for my image galleries, and since I was setting up Drupal for multiple sites, I wanted to do the same with Gallery2.  Doing this on a new site isn't too difficult, and there are numerous sites that detail the procedure, along with the documentation on the Gallery2 website.  However, since I already had existing galleries whose data I wanted to preserve, it was just slightly more involved.  The first steps I will cover will be for setting up Gallery2 as a fresh install.  I will then explain what I had to do in order to get my existing galleries working.

Install Gallery2 Multi-Site

Get the latest version of Gallery2 and upload it to your server.  If you have SSH access, you can upload the zip file and decompress it on the server, saving yourself some time.  I used the 'typical' package, but it is actually recommended to use the 'full' package.  This caused me some problems, which I'll explain in the 'notes' section below.

Let's say my primary site is http://www.domain1.com, and it is located on the server at home/domain/public_html.  If I have installed Drupal in the root directory, then I can install Gallery2 in the root directory as well.  In order to avoid confusion or conflicts, name the Gallery2 directory something like 'gallery2_base' so that the path would be public_html/gallery2_base.  This directory will only contain the code base and not the individual galleries.

Before starting the Gallery2 install, we need directories for the individual galleries, directories to store the data, and databases for each gallery.  I am using separate databases for each gallery, but if you'd prefer, you can use a single shared database provided that you specify a different table prefix for each gallery.  I created the databases domain1_gallery1 and domain1_gallery2 (note that the host automatically prepends the domain1_ prefix to any database I create) and I set the proper permissions for each database.  Ideally, the data directories should be above the root directory so as to not be accessible directly from the web.  I create them in home/domain1/gallery1_g2data and home/domain1/gallery2_g2data and chmod them to 777.  Lastly, we need directories to hold each individual gallery.  Since we are doing a multi-site setup with Drupal as well, these should be in the appropriate 'sites' directory (public_html/sites/default/gallery2, public_html/sites/domain2.com/gallery2, etc.)

With the preliminary steps taken care of, we can proceed to the gallery installation.  Assuming that the code base for the gallery is in gallery2_base, we open a browser and go to http://www.domain1.com/gallery2_base/install to begin the installation process.  This is pretty much self-explanatory, and there are plenty of sites that document this, but here's a quick run-down of the steps:

  1. Welcome -- Select your language, but otherwise nothing happens here.
  2. Authenticate -- Gallery2 needs a login.txt file with randomly generated code to prove you have access to the server.  This file changes for each site in a multi-site install.
  3. System Checks -- Gallery2 makes sure the server can run Gallery2.  If everything shows as success, your are good to go; otherwise, you may need to resolve some issues.
  4. Installation Type -- I'll cover this a bit since the multi-site installation may be a bit confusing.  You have to select the "Multisite Installation" option, then enter the directory for the NEW gallery.  This is the individual gallery for the site: (ie. home/domain1/public_html/sites/domain2.com/gallery2).  For a multisite installation, you cannot specify the directory that contains the code base, which prevents you from overwriting important files.  Also, you need to enter the URL for the NEW gallery (ie. http://www.domain2.com/sites/domain2.com/gallery2/main.php.)  Note that for the initial installation for the primary domain, you would not install as a multi-site and you would set the directory for the code base.
  5. Storage Setup -- This is where you enter the directory for storing the data files (ie. /home/domain1/gallery2_g2data.)
  6. Database Setup -- Enter the database information (DB name, username, and password) for the gallery.  If necessary, specify table and column prefixes.
  7. Admin User Setup -- Set the password for the 'admin' user.
  8. Create Config File -- Gallery2 generates the config.php file.
  9. Check Security -- Gallery2 makes sure the config.php is secure.
  10. Finish Installation -- Installation is complete and you may go to the newly installed gallery.

Special Note About Using Existing Galleries

  1. In Step 6 of the installation process (Database Setup) you can use the database for an existing gallery.  This will give you the option to erase the tables for a clean install, or to reuse the existing table data.  If you want to keep the existing gallery, choose to reuse the tables.
  2. My biggest obstacle with using existing galleries was that I would encounter  errors such as this:
         Error (ERROR_BAD_PATH) : Invalid path: modules/permalinks/module.inc
    There are a couple reasons I had this happen.  First, I started with a fresh codebase rather than using an existing install, which meant any modules I had added weren't available (remember above when I said I used the "typical" package?)  Second (and related) is that my two galleries didn't have the same modules anyway, so even if I did use an existing codebase, I would have had   problems.  I spent quite a bit of time trying to figure this out, and the solution is actually pretty easy.  If you had the forsight to use the "full" package, you may not have this problem at all, since the modules are probably all there already.  Additionally, if you were smart and disabled any non-core modules, you wouldn't be getting this error (though it could still come back to bite you later.)  Since I didn't do either one, I found that the best thing to do was to make a list of the modules I had installed, then go into phpMyAdmin to edit the appropriate database.  In the table g2_PluginPackageMap (note the g2_ table prefix) browse for any module that is giving the error message (such as permalinks in the example) and delete it from the table.  You should also edit table g2_PluginMap to disable these modules.  Once the gallery is installed, you can go into the site administration and re-install the plugins.
  3. Save the headache and just go with the full installation package...

Searchable user list in Drupal using Views

Introduction

There are numerous reasons for wanting a list of members on your site.  If you have a "social" site, then it is beneficial to have this list searchable so that members can find friends who have also registered (imagine if facebook didn't allow you to search for friends...)  Fortunately, this can be done relatively simple in Drupal using just the views module.

Requirements

You will need to have Drupal installed and you will need the Views module.  If you wish to implement the optional feature to do bulk operations on users, then you will also need the Views Bulk Operations module.  If you need help with installing any of these, please refer to the documentation at drupal.org.  It is recommended that you are at least somewhat familiar with the Views module, but we won't be doing anything too advanced here.

Creating the Member List

To create the member list, go to Administer -> Site Building -> Views and click the "Add" tab.  Enter a name and description for the view (for this tutorial, I am using members_list for the name, and Members List for the description.)  Be sure to specify "User" as the view type, and click "Next."

Select "Page" from the drop-down box and click "Add Display" to create a new page view.  Under "Basic Settings," change the Title to "Members List" and change "Use pager" to use either the mini pager (previous and next buttons only) or full pager (includes links to pages.)  Under "Page Settings," change the path to something like "members_list."  You could add it to a menu using the menu field, but I prefer to add it manually to a menu.

Next, we will select what information should be visible in the member list.  Click the '+' under "Fields" and select what you want to have visible.  For example, I have "User: Name", "User: Picture", "User: Created date", and "User: Active" but you can customize this however you like.  You may wish to customize the fields a bit, but usually the defaults are fine.

Click the '+' under "Sort criteria" and select "User: Name" in order to sort the list by the user names.  You may select another or additional sorting criteria.  If you continue with the optional bulk operations, you will be able to change the sort order by clicking the labels, so think of this as the initial sort method.

Finally, we are ready to make it possible to search the member list.  Click the '+' under "Filters" and select the fields you wish to use for search criteria.  These will likely include some of the fields you selected to display, but not necessarily all of them.  For instance, you probably wouldn't search by picture, and searching by created date might not be very helpful either.  Once you have selected the search fields, it is important to expose them.  Do this by editing the field and clicking the "Expose" button.  You may wish to make some other changes, such as modifying the label text, but make sure that "optional" is checked so that you may search by just one field if desired.  Exposing the field allows users to set the search criteria.

At this point, your view should be ready, so be sure to save it (or else you'll lose all that work!!!)  To test that it is working, go to the path you specified for the members list (ie. http://<yoursitename>/members_list.  Initially, this will show you a list of all members.  You can narrow the list by using the search fields at the top of the page.  If this is all you want, then congratulations, you are finished.  However, let's say that you want a way for your administrators to activate or deactivate users in bulk.  Read on for how you can implement this.

Bulk Operations

This section explains how to perform bulk operations on users.  This is helpful if you need to activate/block a number of users at once.  You might want to have this as a separate view or page, just for admins, or you can add it to the memebers list we just created.

Install the Views Bulk Operations module and set the desired permissions.  Note that VBO comes with an actions_permissions group, so take note of that.  Once everything is set up, go to Administer -> Site Building -> Views and find our members_list view that we created above.  Click the "edit" link to edit the view.

Under "Basic Settings," change the style from "Unformatted" to "Bulk Operations."  In the style options, you can select which fields are sortable and which is the default sort field.  This is nice as it allows you to re-sort the list based on different criteria.  Set any options you wish, and select which operations an administrator should be allowed to perform on the users.  Update, save, and you now have a searchable user list with bulk operations functionality!

Add the list to your menu

If you want to add the member list a menu, go to Administer -> Site Building -> Menus and select the menu you wish to add this to.  Simple add a new link using the path you gave for the page, and you'll be all set.

Syndicate content