Jump to content


Photo

Passing variables from HTTPS to HTTP (still noob)


  • Please log in to reply
1 reply to this topic

#1 cnl83

cnl83
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 17 March 2006 - 08:37 PM

Can anyone tell me how to pass variables from HTTPS to HTTP...

Im using this:

from:
[a href=\"https://dataencrypted.com/scormsource/classes/access_user/authenticated.php\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...thenticated.php[/a]

to:
[a href=\"http://www.scormsource.com/classes/access_user/read.php?PHPSESSID=<?=$PHPSESSID?>\" target=\"_blank\"]http://www.scormsource.com/classes/access_...;PHPSESSID?>[/a]

Im getting this error

Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/apex/scormsource-www/classes/access_user/access_user_class.php:24) in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24
&real_name=&levelFive=0
Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0


#2 PWD

PWD
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 18 March 2006 - 03:29 PM

Are you looking to pass form variables or session information? Do you have a snippet of code for us to look at?

If you're looking to pass session information between the two protocols, you'll need to pass your session information in your URL:

$sid = session_name() . '=' . session_id();

<a href="https://somepage.php?<?=$sid?>">My Page</a>

This works from http to https and https to http. From a security standpoint, not generally a good idea to expose your session ID in the URL, but this is the only way I have personally found to do it in the websites I've coded.
[!--fonto:Geneva--][span style="font-family:Geneva"][!--/fonto--]My Gratitude---[!--fontc--][/span][!--/fontc--]
(My gratitude in advance for helping me learn; so I may one day give as freely as you have here today)
----------
[!--sizeo:5--][span style="font-size:18pt;line-height:100%"][!--/sizeo--][!--fonto:Optima--][span style="font-family:Optima"][!--/fonto--][!--coloro:red--][span style="color:red"][!--/coloro--]PWD[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][!--fontc--][/span][!--/fontc--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users