cnl83 Posted March 17, 2006 Share Posted March 17, 2006 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 errorWarning: 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 24Warning: 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 0Warning: 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 Quote Link to comment https://forums.phpfreaks.com/topic/5188-passing-variables-from-https-to-http-still-noob/ Share on other sites More sharing options...
PWD Posted March 18, 2006 Share Posted March 18, 2006 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:[code]$sid = session_name() . '=' . session_id();<a href="https://somepage.php?<?=$sid?>">My Page</a>[/code]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. Quote Link to comment https://forums.phpfreaks.com/topic/5188-passing-variables-from-https-to-http-still-noob/#findComment-18580 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.