Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Bug Reports (Open)
 Database location exposed?!
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Laurie
Starting Member

2 Posts

Posted - 09 July 2003 :  23:15:33  Show Profile  Visit Laurie's Homepage
Hi,

Forum is great - well done. Found an issue that was easily fixed. Say your .mdb is locked or missing for whatever reason, and someone trys to use the forum. On our hosted IIS, a message comes up saying:

-------
Microsoft JET Database Engine error '80004005'

Could not find file 'D:\webspace\.......secret_databasename.mdb'.

/forums/inc_header.asp, line 115
-------

Most disconcerting! So, I added this patch:

-------- inc_header.asp ~ line 115 -----------

set my_Conn = Server.CreateObject("ADODB.Connection")
On Error Resume Next ' <<== Added this
my_Conn.Open strConnString
' vvv Added this vvvv
if Err.Number<>0 then
Response.Write "<br><br><br><center><h3>Apologies .. forums temporarily offline</h3></center>"
Response.Write "<br><br><center><a href='/'>Click here to continue</a></center>"
Response.End
end if
' ^^^ END OF ADD ^^^


------------------------------

Is this of any use, or have I missed the plot!? :-)

Many Thanks,
Laurie


ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 10 July 2003 :  01:26:44  Show Profile  Send ruirib a Yahoo! Message
As long as the folder is outside your web folders, say above the web root folder (and it should be!) that won't give you much trouble. However the added code may indeed be useful.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

MasterOfTheCats
Junior Member

103 Posts

Posted - 10 July 2003 :  02:26:12  Show Profile
Does this work for all databases (inc. MySQL)?
Go to Top of Page

OneWayMule
Dev. Team Member & Support Moderator

Austria
4969 Posts

Posted - 10 July 2003 :  02:33:52  Show Profile  Visit OneWayMule's Homepage  Send OneWayMule an ICQ Message
Yes.

My MODs:
Birthdays - Custom Policy - F.A.Q. Administration - Forum Rules - Guestbook
Links Manager - MyOwnGoogle - Profile Views - Search Log - WebSearch

Useful stuff:
Forum and MOD Installation - MOD Installation Guide - Snitz v3.4.05 Readme - Free ASP Hosts - Support Snitz
Go to Top of Page

MasterOfTheCats
Junior Member

103 Posts

Posted - 10 July 2003 :  07:46:38  Show Profile
I mean, shouldn't it check

my_Conn.Errors.Count and my_Conn.Errors(counter).Number as well as it is done in sub ChkDBInstall()?

Go to Top of Page

Laurie
Starting Member

2 Posts

Posted - 10 July 2003 :  10:14:01  Show Profile  Visit Laurie's Homepage
Yep - as you suggest, if the file is outside the www area, all is well. Unfortunately, our provider doesn't allow this. I mentioned this and was very pleased to find that although the error message appears showing the location of the .mdb, that have some sort of filter activated on IIS which prevents download of Access .mdb's.

Cheers .. Laurie
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 10 July 2003 :  10:15:23  Show Profile  Visit Gremlin's Homepage
No, I don't beleive theres any need for that, if the connection can't be made a vbscript error is generated and checking that I think should be all thats required.

Whats probably required though is resetting the on error resume next statement by adding "On Error Goto 0" after the extra code.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20595 Posts

Posted - 10 July 2003 :  10:27:09  Show Profile  Visit HuwR's Homepage
quote:

Yep - as you suggest, if the file is outside the www area, all is well. Unfortunately, our provider doesn't allow this.
[quote]
You should challenge them about this, it is very bad practice to store database within your web folders.
[quote]
I mentioned this and was very pleased to find that although the error message appears showing the location of the .mdb, that have some sort of filter activated on IIS which prevents download of Access .mdb's


This is fine as long as
a) they actually try to download it rather than access it remotely via forms
and
b) that people actually leave their db's with the default mdb extension, many people change this to make it more difficult for people to guess the db name, so they will have no protection at all
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.74 seconds. Powered By: Snitz Forums 2000 Version 3.4.07