473,385 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SSL and session

I was wondering if someone could help me with a problem that I'm having
in retrieving session variables on a site I am working on for a friend.

I have made the site more developer friendly by passing the filename for
the page body through the URL, e.g www.mysite.com?page=body1.php. This
works well allowing simply writing the code for the body without having
to change the page header, footer and sidebar. For example, the index.php
looks something like this:

################
<?php
include_once($path.'/includes/phpBB_session.php');
include_once($path.'/includes/common.php');
include_once($path.'/includes/functions.php');
?>
<html>
<head>
<title></title>
</head>
<table>
<tr>
<td colspan="4"> <?php include('header.php'); ?></td>
</tr>
<tr>
<td>
<?php include ($path.$page); ?>
</td>
<td>&nbsp;</td>
<td><?php include('rightmenu.php'); ?> </td>
</tr>
<tr>
<td colspan="3"><?php include('footer.php'); ?> </td>
</tr>
</table>
</body>
</html>
################

I have also integrated phpBB sessions throughout the site - fairly
straightforward as well. This is phpBB_session.php:

################
define('IN_PHPBB', true);
$phpbb_root_path = $_SERVER['DOCUMENT_ROOT'].'/phpbb/';
require_once($phpbb_root_path . 'extension.inc');
require_once($phpbb_root_path . 'common.php');

//
// Start session management
//

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

//
// End session management
//
#################

Now I can tailor the content of the page body depending on whether users
are logged in or not and based on their group membership in phpBB. This
has worked very well.

I now want to implement a classified ad system and need to securely
capture users credit card details. The certificate is working. The
problem starts when I call the page "https://www.mysite.com?
page=classifieds.php". When I try to echo $userdate['username'] in
classifieds.php nothing shows up. All of the session variables are empty.
Strangely if i put $userdate['username'] in headers.php and footer.php it
appears. If i stick the code for classifieds.php in index.php, $userdate
['username'] appears.

I suspect that because I am passing the body of the page dynamically
through the URL it is somehow filtered or reset when using ssl.

I would still like to use my dynamic way of calling page body content
rather than have to resort to a less dynamic solution. Is it just the
nature of the beast (ssl) that I can't do it this way? Not having used
ssl before I'm a bit lost. I have tried passing the session id to the new
page through the URL but I can't seem get it working that way either
(again not sure why).

Any help appreaciated.
Jul 17 '05 #1
0 3918

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Damien | last post by:
Hi to all, I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up PHP 4.3.7, better-normalized MySQL ;o). So I've started using the $_SESSION variable instead of register_globals...
1
by: mudge | last post by:
I'm running PHP Version 4.3.10. I'm trying to make it so that when a person logs in using a user name and password that their session is valid and continues for a few months so they don't have to...
6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
5
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session...
0
by: joseph conrad | last post by:
Hi, I tried to implement my own session handler in order to keep control on the process the drawback I foun it is not creating and storing in my cookie the PHPSESSID variable anymore. reading te...
14
by: aroraamit81 | last post by:
Hi, I am facing a trouble. I have some Session variables in my code and somehow my session variables are getting mixed up with other users. For example User A has access to 10 companies and...
7
by: aroraamit81 | last post by:
Well Guys, Here is a very strange trouble. When more than one users request tto same page at the same time then our session gets conflicted. Moreover I printed my SessionID, strangely but true I...
0
by: TRB_NV | last post by:
I'd been using an Access database based shopping cart, but wanted to change it so that it would use session variables. I have a form that's submitted to a page called addtocart.asp that contains...
1
by: Santosh | last post by:
Dear All i am writting a code sending mail with attachement. i am writting code for sending mail in one page and code for attaching a file in the next page. aftet attaching a file i am taking...
5
by: lyealain | last post by:
<% If Session("username") = "" Then Response.Redirect("/CLS/Login.asp") End If Dim conn Dim connectstr Dim db_name, db_username, db_userpassword Dim db_server Dim res
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.