RE: Element undefined in SESSION scope
What is your session timeout? Are you setting it in your cfapplication tag or relying on the server settings? Is it possible that the timeout is too small and destroying the session before the form can be submitted? David Phelan Web Developer IT Security Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office 862-234-9109 Cell dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org -Original Message- From: Priya K [mailto:priya23...@gmail.com] Sent: Tuesday, August 06, 2013 8:35 PM To: cf-talk Subject: Re: Element undefined in SESSION scope May be its something to do with cookie path. If you are using cookie, this might mess up your session and just drops it. On Tuesday, August 6, 2013, Mark A Kruger wrote: Trying a resend. Make sure that cgi.http_referer exists before you try to set it. This is a var created by the web server NOT cf ... so it may or may not reliably exist. Also make sure this code is AFTER your cfapplication tag. On your own system try hitting the page after a cf restart. You may be trying to access the session before you have established a session. The reason it works on local is because during coding you established a session at some previous point. That's all I got :) -Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356416 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Element undefined in SESSION scope
I see that session variables are persisting only after turning on 'use J2EE session variables' setting in coldfusion admin. Here is the link to the question I posted on stackoverflow http://stackoverflow.com/questions/18093985/coldfusion-enabling-j2ee-session-variables-vs-coldfusion-session-variables On Wed, Aug 7, 2013 at 9:11 AM, David Phelan dphe...@emerginghealthit.comwrote: What is your session timeout? Are you setting it in your cfapplication tag or relying on the server settings? Is it possible that the timeout is too small and destroying the session before the form can be submitted? David Phelan Web Developer IT Security Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office 862-234-9109 Cell dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org -Original Message- From: Priya K [mailto:priya23...@gmail.com] Sent: Tuesday, August 06, 2013 8:35 PM To: cf-talk Subject: Re: Element undefined in SESSION scope May be its something to do with cookie path. If you are using cookie, this might mess up your session and just drops it. On Tuesday, August 6, 2013, Mark A Kruger wrote: Trying a resend. Make sure that cgi.http_referer exists before you try to set it. This is a var created by the web server NOT cf ... so it may or may not reliably exist. Also make sure this code is AFTER your cfapplication tag. On your own system try hitting the page after a cf restart. You may be trying to access the session before you have established a session. The reason it works on local is because during coding you established a session at some previous point. That's all I got :) -Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Element undefined in SESSION scope
Can we see some sample code? On Tue, Aug 6, 2013 at 12:43 PM, fun and learning funandlrnn...@gmail.comwrote: All - I am converting a form variable to a session variable.I enabled session management in application.cfm in cfapplication tag. The change works fine only on my system, but when others try it, they get 'Element undefined in SESSION'. What could be the possible reason? Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356406 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Element undefined in SESSION scope
I am just setting up a variable to capture cgi.http_referer. cfset session.referer = cgi.http_referer. Initially, the variable was set up as input type=hidden name=referer value=#CGI.http_referer# This variable is defined on a form, which submits to itself. I want to capture the initial cgi.http_referer value when the user first lands on the form and save it to database upon successful submission, hence was using hidden value. Recent security scanning has identified the input form variable for XSS, and hence I am changing it to a session value. On Tue, Aug 6, 2013 at 3:01 PM, Alan Rother alan.rot...@gmail.com wrote: Can we see some sample code? On Tue, Aug 6, 2013 at 12:43 PM, fun and learning funandlrnn...@gmail.comwrote: All - I am converting a form variable to a session variable.I enabled session management in application.cfm in cfapplication tag. The change works fine only on my system, but when others try it, they get 'Element undefined in SESSION'. What could be the possible reason? Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356407 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Element undefined in SESSION scope
Make sure that cgi.http_referer exists before you try to set it. This is a var created by the web server NOT cf ... so it may or may not reliably exist. Also make sure this code is AFTER your cfapplication tag. On your own system try hitting the page after a cf restart. You may be trying to access the session before you have established a session. The reason it works on local is because during coding you established a session at some previous point. That's all I got :) -Mark Mark Kruger - CFG CF Webtools www.cfwebtools.com www.coldfusionmuse.com O: 402.932.3318 E: mkru...@cfwebtools.com Skype: markakruger -Original Message- From: funand learning [mailto:funandlrnn...@gmail.com] Sent: Tuesday, August 06, 2013 3:08 PM To: cf-talk Subject: Re: Element undefined in SESSION scope I am just setting up a variable to capture cgi.http_referer. cfset session.referer = cgi.http_referer. Initially, the variable was set up as input type=hidden name=referer value=#CGI.http_referer# This variable is defined on a form, which submits to itself. I want to capture the initial cgi.http_referer value when the user first lands on the form and save it to database upon successful submission, hence was using hidden value. Recent security scanning has identified the input form variable for XSS, and hence I am changing it to a session value. On Tue, Aug 6, 2013 at 3:01 PM, Alan Rother alan.rot...@gmail.com wrote: Can we see some sample code? On Tue, Aug 6, 2013 at 12:43 PM, fun and learning funandlrnn...@gmail.comwrote: All - I am converting a form variable to a session variable.I enabled session management in application.cfm in cfapplication tag. The change works fine only on my system, but when others try it, they get 'Element undefined in SESSION'. What could be the possible reason? Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356408 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Element undefined in SESSION scope
Can you please resend the last reply of this post. I am not able to view the reply either in houseoffusion.com nor in my inbox. In inbox I just see the reply starting with 'Make sure...', but when I click the message, it is gone...something is weirdThanks On Tue, Aug 6, 2013 at 3:07 PM, funand learning funandlrnn...@gmail.comwrote: I am just setting up a variable to capture cgi.http_referer. cfset session.referer = cgi.http_referer. Initially, the variable was set up as input type=hidden name=referer value=#CGI.http_referer# This variable is defined on a form, which submits to itself. I want to capture the initial cgi.http_referer value when the user first lands on the form and save it to database upon successful submission, hence was using hidden value. Recent security scanning has identified the input form variable for XSS, and hence I am changing it to a session value. On Tue, Aug 6, 2013 at 3:01 PM, Alan Rother alan.rot...@gmail.com wrote: Can we see some sample code? On Tue, Aug 6, 2013 at 12:43 PM, fun and learning funandlrnn...@gmail.comwrote: All - I am converting a form variable to a session variable.I enabled session management in application.cfm in cfapplication tag. The change works fine only on my system, but when others try it, they get 'Element undefined in SESSION'. What could be the possible reason? Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356409 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Element undefined in SESSION scope
May be its something to do with cookie path. If you are using cookie, this might mess up your session and just drops it. On Tuesday, August 6, 2013, Mark A Kruger wrote: Trying a resend. Make sure that cgi.http_referer exists before you try to set it. This is a var created by the web server NOT cf ... so it may or may not reliably exist. Also make sure this code is AFTER your cfapplication tag. On your own system try hitting the page after a cf restart. You may be trying to access the session before you have established a session. The reason it works on local is because during coding you established a session at some previous point. That's all I got :) -Mark ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356411 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm