HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Programming/Scripts (http://www.howtoforge.com/forums/forumdisplay.php?f=7)
-   -   php https sessions (http://www.howtoforge.com/forums/showthread.php?t=56579)

linux_red 17th March 2012 00:58

php https sessions
 
Hi
I have a problem with php session on my site that is structured like this:

http root = /var/www/site.com/web
https root = /var/www/site.com/web/secure/content

I'm using name based virtrualhosts on apache2 (Fedora x86_64).

I'm doing a test with two simple files:
file1.php in http root

Code:

<?php
  session_start();
 $_SESSION['test'] = 'test';
?>

and file2.php in https root

Code:

<?php
  session_start();
  print_r($_SESSION);
?>

I'm not sure if I did everything right (I never used the sessions with php)
but the output of file 2 (in ssl root) is always 'Array()' which means that does not get the session variables (right?).

I also tried to set session variable via 'GET method' in a link but nothing to do.
I will post configurations if needed. Hope u can help me ... :) Thanks


All times are GMT +2. The time now is 16:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.