Author |
Topic  |
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 06 February 2013 : 22:10:08
|
Oh my; oh how strange! A member asked me to change her profile picture so I logged in on her account and when, in her profile, I clicked on the link to upload/change an avatar, I received this error below. I logged off and signed onto my own account and it did the same in my profile.
It's displaying my admin password for the Chatnow!
I am going to delete my cookies and try again and will post any changes. Does anyone have any ideas as to what could cause this?
Microsoft VBScript compilation error '800a0411'
Name redefined
/tfp/chatroom/functions/functions_chat.asp, line 2
Const AdminPassword = "*********" ------^
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 00:16:01
|
The only thing that comes to my mind is both the Chatnow and the members' avatar are right there together in the inc_header.asp.
I am going to share a copy of that file in case that is what's needed.
Here are lines 508 - 531
else if strAuthType = "db" then Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _ " <td align=""center"">" if strGfxButtons = "1" and (strAvatarURL <> "noavatar.gif" and strShowAvatar = 1) then Response.Write "<input src=""" & strAvatarURL & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine end if end if end if Response.Write "</td>" & vbNewLine & _ " </tr>" & vbNewLine & _ " </table>" & vbNewLine & _ " </td>" & vbNewLine & _ " </tr>" & vbNewLine '###Chat### KCname=strDBNTUserName '###Chat### if (mlev = 4 and aAllowed>0) or (lcase(strNoCookies) = "1") then Response.Write " <tr>" & vbNewLine & _ " <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" if User_Count > 0 then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>") Response.Write "<br /><br /></font></td>" & vbNewLine & _ " </tr>" & vbNewLine end if
Here's a copy of the entire file:
inc_header.asp in txt format
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 02:32:30
|
quote: Originally posted by HuwR
The error means that you have defined Const AdminPassword more than once
Defined Const AdminPassword in my functions_chat.asp more than once? But Const AdminPassword isn't in the file more than once.
There's not another occurrence of AdminPassword and the only other occurrence of Const is in Const ApplicationMsg.
Is that what you're referring to?
I know it's obvious that I am Sooo lost with this!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 02:52:03
|
Here's a copy of my functions_chat.asp in txt format.
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
Posted - 07 February 2013 : 03:35:45
|
Ok, the first line is the problem Const AdminPassword = "**********"
You could try just removing the 'Const' that will stop the error and just let that line set it instead. However it must be defined elsewhere or you would not be getting the error in the first place. |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
 |
|
HuwR
Forum Admin
    
United Kingdom
20595 Posts |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 03:47:58
|
I removed the Const and received this error now.
Microsoft VBScript compilation error '800a0411'
Name redefined
/tfp/chatroom/functions/functions_chat.asp, line 16
Const ApplicationMsg = "ChatRoomMsg" ------^
It wasn't in inc_chat.asp.
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 04:13:59
|
What does this have to do with the "Upload/change avatar" link? That's the only time I receive the error message!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 07 February 2013 : 07:01:39
|
Is the chat function being included on every page? The functions_chat.asp file is most likely included in the inc_chat.asp file, making the duplicate declarations of constants. |
portfolio - linkshrinker - oxle - twitter |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 07:41:19
|
quote: Originally posted by MarcelG
Is the chat function being included on every page?
Yes, the option to join chat is displayed on every page, even on login and registration.
quote: Originally posted by MarcelG
The functions_chat.asp file is most likely included in the inc_chat.asp file, making the duplicate declarations of constants.
Yes, <!--#include file="functions/functions_chat.asp"--> is in the inc_chat.asp file. So, do I just remove it from the inc_chat.asp file?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 08:13:01
|
I thought I'd go ahead and try removing the <!--#include file="functions/functions_chat.asp"--> from inc_chat.asp; that didn't work.
I received this error message:
Application object error 'ASP 0102 : 80004005'
Expecting string input
/tfp/chatroom/functions/functions_users.asp, line 53
The function expects a string as input.
Here are lines 44-55.
Function Reset() Dim saryMessages Dim saryActiveUsers
ReDim saryMessages(5, 0) ReDim saryActiveUsers(6, 0)
Application.Lock Application(ApplicationUsers) = saryActiveUsers Application(ApplicationMsg) = saryMessages Application.UnLock End Function
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 07 February 2013 : 09:35:08
|
Well, you do need to have the functions/functions_chat.asp file loaded, in order to have the functions available. However, duplicate declaration of constants is not allowed. Perform a search in all your files, to check where those constants are declared, for instance the ApplicationMsg constant. |
portfolio - linkshrinker - oxle - twitter |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 07 February 2013 : 09:53:48
|
line 16 of functions_chat.asp - Const ApplicationMsg = "ChatroomMsg"
line 2 of functions_users.asp - Const ApplicationUsers = "ChatUsers"
That's all I found.
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
Posted - 07 February 2013 : 11:02:07
|
So, ApplicationMsg is only declared in functions_chat.asp, and ApplicationUsers is only declared in function_users.asp ? Then, there may be a case of duplicate inclusion of any of those files, for example in config.asp, inc_header.asp, etc. It is a tedious job to perform, but you have to determine via which files those two files are being included, and determine any case of (unintentional) nesting.
Just an example (not sure if it's correct, just an example). Topic.asp includes config.asp, inc_func_common.asp and inc_header.asp, and others. The file inc_chat.asp is loaded via an include in inc_header.asp.
functions_chat.asp is loaded via an include in inc_chat.asp. But, function_chat.asp may also loaded via an include in another file, for example inc_func_common.asp. (Again: example!)
Ergo: two inclusions of the same file. Normally not so much a problem, however as this file declares a CONSTANT, the same constant is declared twice...and that's not allowed. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 07 February 2013 11:06:20 |
 |
|
Topic  |
|