Root Directory Installation
https://secure.gravatar.com/avatar/cf3f3abe2a109700ea937dfd1d03b969.png?d=wavatar&s=28
Mon Aug 12 12:10 Authored by kanto501

Introduction  

DISCLAIMER: When possible, you should try and set up a virtual host for The Bug Genie, pointing its webroot to the folder:
 thebuggenie/


In some setups it is not possible to add a separate virtual host setup for The Bug Genie, and using a "thebuggenie" subfolder is also not desirable. This howto will explain what needs to be done for The Bug Genie to operate in this setup.

Configuration  

No special configuration is necessary to install The Bug Genie in this mode. You can perform these changes either before installation, or on an already installed version of The Bug Genie.

File changes  

You need to copy the entire contents of the "thebuggenie" subfolder into the root directory where you want The Bug Genie installed. The index.php file that comes with the default distribution sets up several path constants which The Bug Genie needs to operate properly. You will need to modify these so it can find the correct information in the correct locations.

index.php  

Open up
 index.php
and change the following lines:
defined('THEBUGGENIE_PATH') || define('THEBUGGENIE_PATH', realpath(getcwd() . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
into
// Don't look one directory up to find the core directory
defined('THEBUGGENIE_PATH') || define('THEBUGGENIE_PATH', realpath(getcwd() . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);


and
defined('THEBUGGENIE_PUBLIC_FOLDER_NAME') || define('THEBUGGENIE_PUBLIC_FOLDER_NAME', substr($path, strrpos($path, DIRECTORY_SEPARATOR) + 1));
into
// Don't autodetect the subfolder, but use "" instead, since there is none
defined('THEBUGGENIE_PUBLIC_FOLDER_NAME') || define('THEBUGGENIE_PUBLIC_FOLDER_NAME', '');


.htaccess  

You will have to make sure that the
 RewriteBase
directive is correctly configured after the installation is completed. This is usually properly configured in the installation, but if the rewrite doesn't work after the installation is complete, check this.

After making these changes, you should be good to go.

Database changes  

If you've set up file storage, you may need to change the local path.
# remember to match the prefix to your settings if different
UPDATE `databasenamehere`.`tbg3_settings` SET `value` = '/location/to/TBG/installation/files/' WHERE `tbg3_settings`.`name` ='upload_localpath';


Notes  

This setup is not distribution compatible. This mean that whenever you update The Bug Genie, you will have to re-apply the patches and changes mentioned above. Different versions of The Bug Genie may behave in different ways, so check back with this document regularly for updated information.

Categories

Installation How To

Attachments 0

Comments 1

 mehtuus
Sep 15, 2012 (21:32)
Cancel
I have a couple of suggestions:
  • SUGGESTION 1: Allow the setup or upgrade process to perform these steps automatically if the person performing the setup/upgrade selects the (non-default) option to run Bug Genie from the root folder. It should also ask for verification on settings such as the prefix used and location path for file storage. Being able to update those table settings through the setup/update process would be very nice.
  • SUGGESTION 2: Have these changes included as "commented lines" within official distribution files. This way anyone that wishes to run from the root folder would only have to (1) move files from the /buggenie subfolder up one directory, (2) from the proper file, comment out the official lines and then uncomment the unofficial root folder lines, and (3) verify the DB table prefix and local path for file storage.
I think suggestion 1 would be the most popular option for users that wish to use the information located on this page, and that is where my vote goes first. Suggestion 2 (while not as code intensive) would still allow things to be consolidated into the official distribution which would be easier for users of TBG, plus as a result you wouldn't have to bother with maintaining another HOWTO page.