How to install snitz forums!
16160 views
posted by Spoon on 01 Sep 2002
Reviews: 1 Rating:
Installing Snitz Forums explained for complete beginners using MS ACCESS
Introduction:
The aim of this page is to help you. It looks like a lot work to install the forums judging by the size of this page, however it is not. I just explain things in a lot of detail so people can understand. Although this page makes reference to SQL and MySQL, I will not actually be showing how to use them with this forum.
What do I need to make Snitz forums work on my server?
Snitz forums is an application built in ASP. The forums use an Access/SQL database(we will talk more about databases later). In order for the forums to work you must therefore be hosted on a server that supports ASP and database access. If you are hosted on a Windows server you will most likely be able to use the forums. You should ring your webhost and ask them if they support ASP and what databases you can use on your server.
Databases:
The two most common types of databases are called 'ACCESS' and 'SQL.' ACCESS Databases are more common than SQL Databases. There are currently two versions of 'ACCESS' - "ACCESS 97" and "ACCESS 2000." The database downloaded with Snitz Forums is 'ACCESS 97'. It doesn't really matter which version of 'ACCESS' you have you on server.
If your server supports 'SQL' and you would like to use 'SQL,' you must have 'SQL' installed on your P.C. If your a beginner and your server supports 'SQL' and 'ACCESS', I recommend you start with access(unless you can use 'SQL').
There is also another type of database called 'MySQL.' It is very similar to 'SQL.'
DATABASE CONNECTION:
When using databases and asp we need a method of connecting to a database. This method is commonly called a 'connection string.' All the 'connection string' does is state where the database is(in which directory it exists). It also tells us what type of database we are using. When the 'connection string' is executed on an ASP page, It merely connects the database to the page. In this way we can now use our ASP page to retrieve information from the database. Below are some examples of 'connection strings' that are used in ASP pages. You need not concern yourself with them, just try and become familiar with them:
Access 97 'connection string:'
strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=c:\inetpub\dbroot\forum.snitz.com\snitz_forum.mdb"
Access 2000 'connection string:'
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\dbroot\forum.snitz.com\snitz_forum.mdb;"
The strConnString in bold font above is very important. It basically gives our connection a name so we can call it(Execute it!). It does not have to be named strConnString, it can be called anything. You will also notice that there are directory paths above(c:\inetpub\dbroot\forum.snitz.com\snitz_forum.mdb). This part of the 'connection string' tells us where to find the database. There are two ways in which we can connect to our database. We can use DSN or DSN-less connections.
DSN or DSN-less:
I am going to explain this topic very briefly as you do not need to know much about it at this point in time. DSN-less connections(examples shown above) are connections in which we state the physical path to the database required. DSN connections are where we only state a name and the server automatically finds the path to the database required. DSN connections are slow and need to be set up on the server by an admin. If you want my advice, stay away from them! DSN-less is best!
Preparing to install the forums:
To install the forums we need to gather specific information. Firstly, find out if your server can support ASP and the type of database you wish to use(refer to 'What do I need to make Snitz forums work on my server?').
Once we know that the server will support our forum it is time to decide on what database we are going to use(refer to 'Databases' above).
Next thing we need to find out it is our directory path on the server. Once we decide to use the forums the ASP pages must know where to find the database. We must know the exact physical path to the database(for using DSN-less connections). However please remember that the database must be in a directory with read/write permissions. If you have a cgi-bin you should upload your database into it. Now that we have decided where we are going to put the database we can continue :)
As I just stated above, we need to find the exact path to the database. You can download find.asp. This file will help you find the directory path to your database. Simply upload the file to the same directory as where you have decided to put your database. Then call the file in your browser(e.g. http://www.yoursite.com/cgi-bin/find.asp etc). Once your browser calls the file follow and read the instructions.
Well now that we have determined the path to our database and the type of database we are using, we can now install the forums.
Installing the forums:
Installing the forums in incredibly easy. The only file we need to edit is config.asp. Once you open up asp go to line 48.
Line 48: 'strDBType = "sqlserver"
Line 49: 'strDBType = "access"
Line 50: 'strDBType = "mysql"
The 3 lines above are very important. You will notice there is a red dash in front of each line. The red is merely to highlight the dash. We only need to edit one of the lines. Depending on what database we are using, we remove the dash from the necessary line. Examples below
NB: Make sure only one of the 3 lines does not have a dash!!!!
****** From here on I will only be showing you how to install Snitz Forums with an ACCESS database ******
Depending on what version of the forums you have you should see something like the below in Line 51:
'## Make sure to uncomment one of the strConnString lines!
Now we need to decide what 'connection string' we are going to use. It basically depends on what sort of database we are going to use. Judging from the font in bold above, you should decide which one suits your situation. We are also going to change the 'connection strings' slightly for ease of use.
If your using an ACCESS database on Brinkster:
If your hosted on brinkster you should look at Option 2. All you have to do here is replace /USERNAME/db/snitz_forums_2000.mdb with your USERNAME where shown and then the path to your database. For example if your USERNAME was Spoon and you were uploading your database to your cgi-bin you would replace it with /Spoon/cgi-bin/snitz_forums_2000.mdb. Once you have completed that you should delete the dash ' so your 'connection string' should look something like this:
strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/USERNAME/db/snitz_forums_2000.mdb")
'## MS Access 97 on Brinkster
If your using an ACCESS 97 database:
If you are not hosted on brinkster you should consider option 3. All you need to do here is replace the c:\inetpub\dbroot\snitz_forums_2000.mdb with the directory path which you found earlier using find.asp(refer to 'Preparing to install the forums') and delete the dash ' at option 3. So for example, if your directory path was found to be C:\site_files\cgi-bin\ your 'connection string' should be like this:
strConnString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\site_files\cgi-bin\snitz_forums_2000.mdb"
'## MS Access 97
NB: You can also ( in most cases ) use the following code for an ACCESS 97 Database. Its a faster connection that the one above.
If you are using an ACCESS 97 or ACCESS 2000 database:
You can use option 4 for both ACCESS 97 and ACCESS 2000 databases. However, to makes things easier we are going to modify the code slightly. We are going to change
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/tools/snitz_forums_2000.mdb");"
'## MS Access 2000
to the following
'strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\dbroot\tools\snitz_forums_2000.mdb;"
'## MS Access 2000
NB: Depending on which version of the forum you are installing, the above change may already be there, in which case you do not need to carry out the step above
Once we have completed that task we can now make it point to our database. Delete the dash ' in front of strConnstring on option 4. Next change c:\inetpub\dbroot\tools\snitz_forums_2000.mdb to your path to your database(refer above 'If your using ACCESS 97 database'). E.g.
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\site_files\cgi-bin\snitz_forums_2000.mdb;"
'## MS Access 2000
This should work with ACCESS 97 or ACCESS 2000. If it does not work with an ACCESS 97 dB, try changing the 'connection string' to:
strConnString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\site_files\cgi-bin\snitz_forums_2000.mdb;"
'## MS Access 2000
Now upload all the files to the server and run setup.asp. This file will tell you if your forum can connect to the database. If it can't it means that you have made an error in changing your 'connection strings' or you do not have the right path to your database. In this case you should re-edit config.asp and see if you have made an error. If you have made an error just re-upload config.asp(replace the old one). There is no need to upload the all the files again. Also make sure you have your database in a read/write directory.
In some cases you find that setup.asp does not load, it times out. This happened to me before and the way i fixed was (only if your running PWS on win 98 or running IIS4 on win NT) to download new MDAC drivers from microsoft. Once i did that, i installed them, rebooted my computer, ran setup.asp and everything worked fine. Here is a link to download the latest MDAC drivers.
http://www.microsoft.com/data/
If you are still having problems visit the support forums at http://forum.snitz.com/forum
I would appreciate any feedback on the helpfulness of this page. Is there any bits I should explain in more detail? etc. Please do not email me with support questions, I will be at the support forums to help with your questions.
P.S. Thanks to brad for sorting out the format. Cheers buddy!
Back to List
Pages:
1
2
3
4
Report a problem
Loading...
Post a Review
Loading...