954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

setting up secure pages and sessions

Dear Forum, I've been doing php for sometime but just doing my first secure site. I am usign shared ssl from my webhost. I setup my pages and tested a paymennt system and the test is ok but now need to move the pages that contain personal info to the secure folder. However I find that I cant reference my regular folders from the secure folders and my session variables are not being read from the secure folder. That could make sense because the whole essense is security but how do I set this up? Do I have to make copies of all the files (eg css, javascript) that are needed to make the pages work? How do I ensure the session is accessible so that I can pass info (eg the fact that a user is logged in) back and forth between secure and non secure pages?

jgna
Newbie Poster
1 post since Feb 2009
Reputation Points: 10
Solved Threads: 0
 

If you want the secure folder sessions to not be read from any other folder, then at the top of all your php files in the secure folder place the following code and it will make the session data in that folder only viewable within that folder.

<?
session_name("srmcvkdoejh48fo4mnf8");
session_start();
cwarn23
Occupation: Genius
Team Colleague
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You