Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i pass variables from http to https

Status
Not open for further replies.

r0bbb

Programmer
May 16, 2006
4
0
0
GB
Hi

I would like to pass some variables from a non secure page to a secure https page. Is this possible? The variables im sending are not particularly private, nor will they affect anything on the https side if changed. I was thinking of using post, but would this cause warnings for the user in IE?

thanks

Rob
 
I read elsewhere that session variables are lost when transferring from http to https as its treated as a different domain? if not then that answers a lot of my problems. can anyone confirm thats true?
 
r0bbb read correctly. When using the <cflocation> tag any and all session vars are destoryed, it's just not between http and https.

____________________________________
Just Imagine.
 
cflocation kills sessions? new to me.

test.cfm
<application...>
<cfset session.test = "whatever">
<cflocation addtoken="No" url="test2.cfm">

test2.cfm
<cfdump var="#session#">

works every time, first visit or not, clear cookies, etc...
if first visit on session is test2.cfm, there is no session.test, of course. If first visit is test.cfm, there surely is session.test on test2.cfm


Kevin

Phase 1: Read the CFML Reference
Phase 2: ???
Phase 3: Profit!
 
Under certain circumstances, they will not work as intended

Don't know about others, but the "under certain circumstances" part worries me. The last thing a developer (or a site owner) wants is to be under those circumstances.

I hope Adobe will address this issue to eliminate those certain circumstances.

____________________________________
Just Imagine.
 
by "under certain circumstances" I guess I meant that after looking at the links you posted, some people had some sort of issue with session vars, but there was no conclusion as to what caused it.

The code posted in one of those links does in fact work just fin in MX 7.

I have never had a problem from 5 til now, was it a bug that was updated? That houseoffusion post was from 2001. The other link only mentions 4.x

I'm not saying your wrong, I'm just saying that I have never had a problem, even tryed to recreate one, and couldn't make a cflocation tag and sessions fail.

If you know just what is going on, I would love to know too. I'm going to play around some more and see if I can get session vars to dissapear using cflocation.

Kevin

Phase 1: Read the CFML Reference
Phase 2: ???
Phase 3: Profit!
 
I first had a problem with session vars and cflocation using CF6. It was just a run-of-the-mill session var that I tried to use in cflocation, and whenever i tried that, i kept getting the error that the var does not exist. But when I cfoutput the var before the cflocation tag lo-and-behold the var present.

I guess this is one those things that happens all of a sudden and persists until you do some code changes.

Macromedia used have a TechNote (Macromedia TechNote 22712) that dealt with this, but can't find a link of that technote on adobe's site. The link used to be
____________________________________
Just Imagine.
 
Never seen this problem either and I use sessions with cflocation quite a bit on a few sites. If it was a common problem I would have either come across it myself or heard from at least one client about it by now. [wink]

Wullie

Fresh Look - Quality Coldfusion 7/Windows Hosting
YetiHost - Coming Soon

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I'm still on CF 5.0 and have hundreds of <CFLOCATION> tags in my applications.

I've never experienced a loss of variables.

At times I've lost my ability to reference them. But I'm sure that's a personal problem.

If anyone comes up with any specific cause and effect on this issue please share.

Kind of a disconcerting subject....

Thanks
Lyndon
 
This looks similar to a problem we am experiencing when accessing one of our websites from outside our network. Within the network and on all our other websites, screens using the same processes are working fine. This particular one keeps crossing session variables when accessed externally - not a good thing at all.

On initital login, a session variable is set for the username. The page that sets the session variables uses cflocation to pass to the main menu screen. When I display the session.username on this screen, it is correct. From this screen a series of buttons with Javascript window.open commands determine what screen is launched. Sometime between here and the new screen, the session.username is sometimes crossing with other usernames. If I use submit() instead (which reuses the current window), then the screen stays within the correct session, which is what I am doing until I find a solution, but I really would like to keep the main menu and launch each option on a new window. The only thing different with this website is that it shares an IP address with another site that is really an extension of it.
 
We have the same problem occasionally where a customer's order exists before they log in to the checkout process and then it vanishes. Happens about once a day. We have been having this problem since CF5 and are now using CF6.1

 
I have never had a problem with CFLOCATION killing session variables - and there are probably a thousand instances of CFLOCATION in my intranet. However, I have run across instances of CFTRANSACTION doing just that.

Cheers,

Bluetone
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top