Jump to content

Passing variables from HTTPS to HTTP (still noob)


cnl83

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.