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 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. 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
Archived
This topic is now archived and is closed to further replies.