Author |
Topic |
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 17:23:23
|
Having recently upgraded to ver 06 and installed a couple of the mods from previous version, I thought I would check the various links within the admin_home.asp
When I click the link to Config Email Server the page does not display. I have checked the admin_home.asp links all seems okay, the admin_config_email.asp file is on the server. I get the HTTP 500 - Internal server error Internet Explorer page can not be displayed.. The line in the admin_home.asp for the link is
" <LI><span class=""spnMessageText""><a href=""admin_config_email.asp"">Email Configuration</a></span></LI>" & vbNewLine & _
I know there has been no edits to the admin_config_email.asp file. Any help would be appreciated.
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 17:33:57
|
Here is a link to text file of admin_config_email.asp link removed |
Edited by - Andy Humm on 22 February 2007 15:20:00 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 17:55:20
|
The error message is
Microsoft VBScript compilation error '800a0411'
Name redefined
/forum/admin_config_email.asp, line 183
dim i, j ----^
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 18:13:50
|
I am sure nothing has been changed within the admin_config_email.asp file, i have even uploaded a fresh file from the zip file that was provided with version 06 Since I commented the beginning of line 183 it works But that doesnt explain why - has this routine been taken out?
' dim i, j j = 0 for i=0 to UBound(theComponent) if IsObjInstalled(theComponent(i)) then Response.Write " <option value=""" & theComponentValue(i) & """" & chkSelect(strMailMode,theComponentValue(i)) & ">" & theComponentName(i) & "</option>" & vbNewline else j = j + 1 end if
|
Edited by - Andy Humm on 19 February 2007 04:20:06 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 18 February 2007 : 18:17:38
|
The code will work as expected. Variable declaration is optional in VbScript. You must have added a similar definition as a result of a mod to one of the included files, so I just commented these.
Alternatively you can just search the included files to check where the variables i was defined. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 18:22:55
|
Since last post, I have looked at the original admin_config_email.asp file and there is not a comment at the begining of (line 183) dim i, j I have removed the comment and edited line 183 to read: dim j
(i.e. removed the i,) and the email config works! how strange
|
Edited by - Andy Humm on 18 February 2007 18:24:21 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 18 February 2007 : 18:31:51
|
the reason that you are getting the problem is because you probably installed a MOD somewhere that is also using a dim i, it may not have anything todo with admin_config_email, but dimming a variable means you can not dim it anywhere else on your site. |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 18 February 2007 : 18:40:54
|
thank you for your stirling help.. again, |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 19 February 2007 : 08:24:22
|
Just a general note to the world - this is why we've moved along since the ZX80 days of single-character variable names (i, j) to things like intPageLayoutLoopCounter ;-) |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 19 February 2007 : 08:45:01
|
single character variables still have their place when used for temporary loop counters there is no point in declaring a variable called intPageLayoutLoopCounter when i will suffice, variable names also take up application resources. |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 19 February 2007 : 15:00:37
|
heh heh, ok I was taking an extreme case with a long variable name etc, and yes, i and j (and foo and bar) are the most common loop counters, but it does mean you can hit cases like the above, or hit other problems when you've not got the luxury of variant datatypes and end up trying to stuff a string into an int
Really, looking at the above, the problem and fix both come down to vbscript being extremely tolerent of datatype binding, which encourages sloppy practice, which leaves people confused with their first tightly-bound Option Strict app ;-) |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 19 February 2007 : 15:19:17
|
yes, well vb and vbscript are not really good languages to write in for that and many other reasons which is why I prefer to use C# for my .Net stuff, it is a lot closer to what I am used to writing code in, VB is a bit toy town in comparison, but each to his own as they say |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 19 February 2007 : 16:39:14
|
agreed - horses for courses to some degree as the languages are (historically) targetted at different audiences - whilst the C++ guys were allocating their first few bytes of memory, the VB guys presented a 'good enough' working prototype to the business users. It may have been 30% slower to run, but clock cycles are cheap now, and frankly the savings made by having the app today instead of next week make business analysts moist!
Also, in terms of code maintenence, C and C++ were often described as 'write only' languages
Performance-wise at runtime I do not percieve any real advantage to C# or VB.NET, but then again am less close to the code these days - do you see any strong advantage of one over the other now VB has matured a bit? |
|
|
rkp
New Member
59 Posts |
Posted - 02 July 2007 : 09:41:34
|
quote: Originally posted by Andy Humm
Since last post, I have looked at the original admin_config_email.asp file and there is not a comment at the begining of (line 183) dim i, j I have removed the comment and edited line 183 to read: dim j
(i.e. removed the i,) and the email config works! how strange
I dimmed line 183. Is this going to affect other Mods? I am using the:
Search Log Upgrade v1.0 -> 1.0.1 Mod Search Log v 1.0.1 Mod Crash's Hover Color Mod Site Integration Mod (turned off) and Logged in users who are active v3.3 and of course, edited the script in many places...
Also just noticed that my password reset mod is not working. |
Edited by - rkp on 02 July 2007 10:07:59 |
|
|
Topic |
|