GauravBhabu
Advanced Member
4288 Posts |
Posted - 29 January 2002 : 00:31:40
|
<font color=green><b>PROCEDURE TO CONFIGURE MULTIPLE INSTANCES OF SNITZ FORUMS 3.3.03</b></font id=green>
<b><i>ACKNOWLEDGEMENTS</i></b>
I want to thank Beano_ie for posting the original topic related to this issue. Special thanks go out to Beano_ie for going to bed early <img src=icon_smile_tongue.gif border=0 align=middle> while GauravBhabu -- the expert -- stayed up late with me to work through the issue -- even after I tried to quit myself -- GauravBhabu hung in there with me -- together we worked through the procedure that follows. I hope documenting this procedure will prove sufficient to help others. Thank you both.
<b><i>INTRODUCTION: README.TXT</i></b>
This document you are now reading should be used with the readme.txt file in <b>side-by-side mode</b> and it is going to be up to you to try to make sense of the duplicity of what this document tries to convey where it may digress or otherwise replace statements you will read in the instructions provided in the readme.txt file.
Thus, if you intend to use an Access database to operate multiple instances of the forums realize that the readme.txt statements are sound and reliable for a <i>single instance of the forums</i> but for <i>multiple instances of the forums</i> there are are 'other issues' that need to be resolved with regard to the code and the database. This document hopes to discuss and resolve those 'other issues.'
<font color=red><b><i>NOTE:</i></b> <i>This document discusses creating <b>two instances</b> of the forums. Creating three or more instances of the forums may be possible using this strategy but I do not think it practical when using an Access database.</i></font id=red>
<font color=green><b>INSTALL THE FIRST INSTANCE OF THE FORUMS</b></font id=green>
<b><i>SETUP THE FILE SYSTEM SCHEMA: INITIAL INSTANCE</i></b>
wwwroot/myWebSite wwwroot/myWebSite/myDatabaseFiles/allForumData.mdb wwwroot/myWebSite/myForum1
Note that I am using a 'First Person' generic file and folder naming schema where:
<ul><li><b>myWebsite</b> indicates the name of the folder that contains the website. If you are being hosted by a service provider this folder may be named something like 'NT25678' that indicates the name of your account.</li> <li><b>myDatabaseFiles</b> indicates the name of the folder that the website host provider makes available for the centralized location of database files. Front Pages uses the folder name <i>fpdb</i> for example. If you are using Front Page you should locate the database file for your forums in the <i>fpdb</i> folder.</li> <li><b>allForumData.mdb</b></li> indicates the name of the database file that will be used to contain all data for all forums. Literally. The database file that is distributed with 3.3.03 is named <i>snitz_forums_2000.mdb</i> and we are referring to that file throughout this document using the generic name <i>allForumData.mdb.</i> The tables in the database file need to be duplicated and renamed as you will shortly learn. </ul>
<font color=red><i>Install all files into the myForum1 folder. Unzip the tools.zip file into the same folder.</i></font id=red>
<b><i>SETUP THE ACCESS MDB DATABASE FILE</i></b>
As mentioned, the 3.3.03 release is distributed with an MDB File that was actually created using Access 97 not Access 2000 as the name of the MDB file may imply to you. This MDB file is located in the tools.zip archive and is named <i>snitz_forums_2000.mdb</i>.
If you intend to use Access 2000 to manage your database you must convert the snitz_forums_2000.mdb file before using it with Access 2000. If you intend to keep and use the same file name of the snitz_forums_2000.mdb database file when you publish that database file to your production web server you should temporarily rename the snitz_forums_2000.mdb file to <i>was_snitz_forums_2000.mdb</i> before using Access 2000 to convert the database file. The reason will soon be obvious. If you do not intend to use the snitz_forums_2000.mdb file name use the file name of your choice when converting snitz_forums_2000.mdb to an Access 2000 database format.
Open Access 2000 and use the menu via Tools > Database Utilities > Convert Database to open the file named <i>was_snitz_forums_2000.mdb</i> and convert the database file to <i>snitz_forums_2000.mdb</i>. Save the Access 97 version of the database file named was_snitz_forums_2000.mdb as your backup copy should you need to revert for whatever reason.
<b><i>MODIFY CODE: CONFIG.ASP - FIRST INSTANCE</i></b>
<font color=red>LINE 48:</font id=red> 48: 'strDBType = "access" <font color=red><i>Remove the comment character to indicate you are using the Access database type.</i></font id=red>
<font color=red>LINES 53-61:</font id=red> <font color=red><i>Choose a Connection String and modify it to use your copy of the allForumData.mdb file.</i></font id=red>
<font color=red>LINE 63:</font id=red> 63: strTablePrefix = "FORUM_" <font color=red><i>Leave to read as shown.</i></font id=red>
<b><i>MODIFY CODE: DEFAULT.ASP - FIRST INSTANCE</i></b> <i>Note: This is a bug in version 3.03 and is fixed for next release</i> <font color=red>LINE 199:</font id=red> 199: strTablePrefix & "FORUM.F_SUBSCRIPTION, " &_ <font color=red><i>Change to read as shown.</i></font id=red>
<b><i>MODIFY CODE: INC_FUNCTIONS.ASP - FIRST INSTANCE</i></b> <i>Note: This is a bug in version 3.03 and is fixed for next release</i>
<font color=red>LINE 1097:</font id=red> strSql = strSql & " FROM " & strTablePrefix & "MODERATOR mo, " & strMemberTablePrefix & "MEMBERS me " <font color=red><i>Change to read as shown.</i></font id=red>
<font color=green><b>END OF MODIFICATIONS: FIRST INITIAL INSTANCE</b></font id=green> <font color=red><i>Load your forum at this point to make sure it functions. Login to your forum. You should now have a functional forum. Do not proceed until you have a forum that functions. Go over each step to make sure you have not made any mistakes. My forums work. <img src=icon_smile_cool.gif border=0 align=middle> Yours should too. </i></font id=red>
<font color=green><b>INSTALL THE SECOND INSTANCE OF THE FORUMS</b></font id=green>
<b><i>SETUP THE FILE SYSTEM SCHEMA: SECOND INSTANCE</i></b>
wwwroot/myWebSite wwwroot/myWebSite/myForum2
Create a folder for myForum2. Copy all files from the myForum folder and paste the files into the myForum2 folder. It is not neccessary to keep any copies of the MDB database files except for the allForumData.mdb file that is supposed to be located in the fpdb folder or the folder your host provider has created for you to securely locate your database files.
<b><i>MODIFY CODE: CONFIG.ASP - SECOND INSTANCE</i></b>
<font color=red>LINE 63:</font id=red> 63: strTablePrefix = "FORUM2_" <font color=red><i>Modify to read as shown.</i></font id=red>
<b><i>MODIFY THE DATABASE</i></b>
This step is critical. You need to open the allForumData.mdb file in Access. You will observe many tables. Each table is named using a prefix. The prefix is: <b>FORUM_</b>.
<b>Except for one table named FORUM_MEMBERS</b> you are going to copy and paste each and every table in the allForumData.mdb file. Access will not allow you to paste a copy of an existing table into the same database file unless the pasted copy has a unique name.
You are going to rename the prefix of each copy of each table that you paste into the allForumData.mdb file. You will rename each prefix <b>FORUM2_</b>.
<b>NOTE:</b> We do not copy and paste the FORUM_MEMBERS table and we do not rename the FORUM_MEMBERS table. The FORUM_MEMBERS table allows us to have all member data stored in a single table. All other modifications we have made allows each multiple instance of the forums to access and use the member data stored in a single instance of the FORUM_MEMBERS table and believe it or not we're through <img src=icon_smile.gif border=0 align=middle>
<font color=green><b>END OF MODIFICATIONS: SECOND INSTANCE</b></font id=green> <font color=red><i>Load your second forum at this point to make sure it functions. Login to your second forum. You should now have a functional second forum. Do not proceed until you have a second forum that functions. Go over each step to make sure you have not made any mistakes. My forums work. <img src=icon_smile_cool.gif border=0 align=middle> Yours should too. </i></font id=red>
<b>FINAL NOTE:</b> The only reason I can think of that may prevent your forums from functioning at this point may be due to the fact that if and when you modified the Access database file on your local machine the file system permissions on your local machine may have been applied to the allForumData.mdb database file making your database file inaccessible when it was put back onto the web server. If this happens you may have to contact your host provider and ask that the file permissions on the allForumData.mdb file be checked and reconfigured if neccessary.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> <b><%= Clinton Gallagher, "Twice the Results -- Half the Cost"</b> Architectural & e-Business Consulting -- Software Development Located in Wauwatosa, Milwaukee County, Wisconsin 53226 USA NET csgallagher@wi.rr.com URL http://www.metromilwaukee.com/clintongallagher/ <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<font size=1>www.forumSquare.com - GauravBhabu - <font color=blue>It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.</font id=blue></font id=size1> |
|