|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
undefined value error weird
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308718
> ok... hopefully no one else will encounter this error, but I found a
> forum that is discussing this issue... the problem isn't in the code
> but in the way coldfusion 8 is connecting to mysql 5 db... here is the
> link for those interested:
>
> http://www.adobe.com/cfusion/webforums/forum/messageview.
cfm?forumid=1&catid=3&th>
readid=1303546&highlight_key=y&keyword1=Maintain%20connections#4723205
Well that sucks! Yanno, I've had problems with CF8 and MySQL in the past. It's
unrelated, but they emailed me an unreleased hotfix that fixed me right up.
Author: Jessica Kennedy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308658
ok... hopefully no one else will encounter this error, but I found a forum that
is discussing this issue... the problem isn't in the code but in the way
coldfusion 8 is connecting to mysql 5 db... here is the link for those
interested:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=3&threadid=1303546&highlight_key=y&keyword1=Maintain%20connections#4723205
Author: Jessica Kennedy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308622
That might work assuming the error is in fact in the empty array... i needed a
full array for a while, but it isn't necessary anymore, so that'll be something I
will change.
I think the error might be in the application, after all... I got the same error
randomly in a secure section of the site where there was nothing else to be
blank. at least now i have a pretty good idea of the cause, just not the
solution... yet...
----- Excess quoted text cut - see Original Post for more -----
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308601
Maybe somethin like this would work?
<cfif listLen(cgi.server_name, ".")>
<cfset theServer = listFirst(cgi.server_name, ".")>
<cfelse>
<cfset theServer = "Whatever">
</cfif>
<cfquery>....
WHERE username = <cfqueryparam value="#theServer#">
</cfquery>
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308600
> Duly noted on queryparams! Problem still is that I can't replicate
> the problem... if I cfdump the vars when I go back to refresh the page
> the error goes away, and I can't figure out how to get it back.
Are you just trying to grab the server name? Looks like you're jumping thru an
extra hoop converting it to an array like that.
Just use this: listFirst(cgi.server_name, ".")
Doubt that solves your problem. Just something I noticed.
Will
Author: Jessica Kennedy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308598
Duly noted on queryparams! Problem still is that I can't replicate the
problem... if I cfdump the vars when I go back to refresh the page the error goes
away, and I can't figure out how to get it back.
I've considered the issue being in the application variable not declaring first.
this code is in a stored template called to the page... could that be it, and if
so,,, how can I fix it??
----- Excess quoted text cut - see Original Post for more -----
Author: Will Tomlinson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308586
----- Excess quoted text cut - see Original Post for more -----
1. Dump cgi scope to see what's in your server_name variable.
2. More of a heads up - the list is about to jump you for not using
<cfqueryparam> in your WHERE clause. :)
Whenever in doubt, dump!
hth,
Will
Author: Jessica Kennedy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56922#308580
Ok, every once in a while, usually the first time I load my website every few
hours, I am getting this error:
" The system has attempted to use an undefined value, which usually indicates a
programming error, either in your code or some system code.
Null Pointers are another name for undefined values."
upon refreshing the page, the error goes away completely (even clearing all
private data will not bring the error back), which is making it very difficult to
pinpoint exactly what the problem is... here is the code I have that is throwing
the error, according to Coldfusion it throws on line 8:
4 : <cfset finduser = ListToArray(cgi.server_name, ".")>
5 : <cfquery name="rsfinduser" datasource="#application.db#">
6 : SELECT dealerID, username, first_name, last_name
7 : FROM tblsozo_dealers
8 : WHERE username = '#finduser[1]#'
9 : </cfquery>
The only thing I could figure is that finduser[1] was undefined, so I added a
clause to give finduser[1] a name in the highly unlikely event that it was
undefined, to no avail. Also, the error is only throwing on my web server, not
on the testing server, don't know if that is important or not.
Any help would be greatly appreciated! Thanks!
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||