HELP - Using fusebox

I'm using Fusebox 3.....and ever since I moved my sites over to this server, I'm having all kinds of problems. Note: my apps work fine on my local server. So, I fixed the cfapplication tag as it is in the cfregistry sticky, and that cfid/cftoken error went away, but now I get another error.

Complex object types cannot be converted to simple values.
The expression has requested a variable or an intermediate expression result as a simple value, however, the result cannot be converted to a simple value. Simple values are strings, numbers, boolean values, and date/time values. Queries, arrays, and COM objects are examples of complex values.
The most likely cause of the error is that you are trying to use a complex value as a simple one. For example, you might be trying to use a query variable in a <CFIF> tag. This was possible in ColdFusion 2.0 but creates an error in later versions.


The error occurred in D:\hshome\....\Application.cfm: line 18

16 : <cfset directAccessFiles="#request.self#,">
17 : <cfloop list="#directAccessFiles#" index="file">
18 : <cfif not listFindNoCase(cgi.script_name, file, '/')>
19 : <!--- Run this code, including sending to request.self, or logging potential hack attempts --->
20 : </cfif>
 
weboxygen said:
I'm using Fusebox 3.....and ever since I moved my sites over to this server, I'm having all kinds of problems. Note: my apps work fine on my local server. So, I fixed the cfapplication tag as it is in the cfregistry sticky, and that cfid/cftoken error went away, but now I get another error.
Shot in the dark here but it looks like you're using a reserved keyword in the CFLoop - try changing the index variable name that you're using from "file" to something else.
 
See, the thing about it is that is part of the core fusebox files. If I change that, I have no idea what else that will effect. :(

I'm at a loss.....and I need my sites working. It's so weird because I've put these sites on 2 other servers before coming to Jodohost, and never had a problem with them functioning. And now, they suddenly don't work. I can only imagine, it's a result of the way the Cold Fusion server must be configured here....only I can't pinpoint what the culprit is.
 
You mention that this is a part of the FB Core - have you posted this question on Fusebox.org or any other FB based site? I'm no FB expert - just got Jeff Peter's book on FB4 and saw a demo, looks sharp but I haven't played with it at all.

To aid in troubleshooting I would suggest making the following changes to the Application.cfm file and see what happens:

Code:
ADD: <cfdump var="#request.self#">
16 : <cfset directAccessFiles="#request.self#,">
ADD: <cfdump var="#directAccessFiles#">
17 : <cfloop list="#directAccessFiles#" index="file">
ADD: <cfdump var="#file#">
18 : <cfif not listFindNoCase(cgi.script_name, file, '/')>
19 : <!--- Run this code, including sending to request.self, or logging potential hack attempts --->
20 : </cfif>

Make those changes and see what the results of the dumps are, maybe something is set differently that is affecting the FB architecture.
 
The syntax is...
listfindnocase(list, value, delimiters) while findnocase is...
findnocase(substring, string, start) (maybe you just got these backwards?)
CGI.script_name can't be searched as a list because its not.

The error occurred in D:\hshome\....\Application.cfm: line 18

16 : <cfset directAccessFiles="#request.self#,">
17 : <cfloop list="#directAccessFiles#" index="file">
18 : <cfif not listFindNoCase(cgi.script_name, file, '/')>
19 : <!--- Run this code, including sending to request.self, or logging potential hack attempts --->
20 : </cfif>

On line 17, you set the index to "file" and then in the very next line, line 18, you're searching for a substring of #cgi.script_name# in string name "file." I think you mean to do it the other way around.

First, I'd make you're index called "i" instead of "file," that sounds confusing. Secondly, since you're in a loop I don't see exactly why you're using listfindnocase instead of just plain findnocase with listgetat...is that a required part of fusebox? Because of this (listfindnocase), you end up searching through the same list over and over again for the same term, for as many list items there are (in your loop). I can't see all of your code, but from what I see, I'd redo it like this. *note, I don't know fusebox*

16 : <cfset directAccessFiles="#request.self#,">
17 : <cfloop list="#directAccessFiles#" index="i">
18 : <cfif not FindNoCase(cgi.script_name, ListGetAt(directAccessFiles, i, '/'))>
19 : <!--- Run this code, including sending to request.self, or logging potential hack attempts --->
20 : </cfif>

Thats what I believe the corrected form of your code should look like...but I'm still kinda puzzled. You do know that CGI.script_name is gonna be static, so if its being checked against a list of other "script_names" its gonna trigger. Thats unless the list consists of one item, which matches up against your CGI.script_name. What you probably want to do is: 1. search for the CGI.script_name in the list of legitimate script_names 2. Record the hack attempt if the search result returns false. Just a guess, but have you just been copy/pasting code snippets from random stuf floating around? Looking at that code makes my mind wobble, still. No offense, I'm just confused about whats going on in the code.

So, I'm assuming you really want to do this....(notice no loop)
17 : <cfif listfindnocase(directAccessFiles, CGI.script_name, '/')>
18 : <!--- Run this code, including sending to request.self, or logging potential hack attempts --->
19 : </cfif>
 
Back
Top