0

[EDIT SOLVED]

ok problem solved ! for debian users u need to edit /etc/php5/apache2/conf.d/suhoshin.ini that come with default configuration like this : suhosin.session.cryptua = on suhosin.session.cryptdocroot = on just turn these two options to off suhosin.session.cryptua = off suhosin.session.cryptdocroot = off restart your apache server

[END EDIT]

i have 2 application : app1.domain.ltd app2.domain.ltd , /home/www/app1 and /home/www/app2 on the same server. app1/index.php :

<?php
ini_set('session.cookie_domain', '.domain.ltd'); 
session_name('mysession');
session_start();
if (!isset($_SESSION['data'])) $_SESSION['data'] = time();
echo session_id();
var_dump($_SESSION);
?>

app2/index.php

<?php
ini_set('session.cookie_domain', '.domain.ltd'); 
session_name('mysession');
session_start();
echo session_id(); //same id as app1
var_dump($_SESSION); //session is empty 
?> 

i call first app1/index.php (call multiple times will keep the same data on session), then when i call app2/index.php my session is empty even if i go back to app1/index.php it will regenerate the data with new time ...

PHP Version 5.3.3-7+squeeze14 Apache Version Apache/2.2.16 (Debian)

session settings -> http://img211.imageshack.us/img211/1748/sessioninfoya3.png

wondering what can cause this , am i tired ? o_O Any help would be appreciated.

btw: i am using this code to debug and it print all same infos except session content :

echo '<pre>';
echo '------ACTIVE SESSION :---------<br>';
echo 'SESSION SAVE PATH : '.session_save_path().'<br>';
echo 'COOKIE PARAMS : ';
var_dump(session_get_cookie_params());
echo 'SESSION NAME : '.session_name().'<br>';
echo 'SESSION SSID : '.session_id()  .'<br>';
var_dump($_SESSION);
echo '----------- END ---------<br><hr>';
echo '</pre>';
Nadjib
  • 1
  • 1
  • [Session persisitence between multiple domain?](http://stackoverflow.com/questions/4395810/session-persisitence-between-multiple-domain) – जलजनक Jan 26 '13 at 08:16

1 Answers1

0

change the session_name('my_session'); different one

CRM
  • 11
  • 2