Jump to content

Archived

This topic is now archived and is closed to further replies.

cnl83

Passing variables from HTTPS to HTTP (still noob)

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.