1

I want to access session on all subdomains. Both subdomains are on same server. I have added the line below in .htaccess:

php_value session.cookie_domain .domain.com

Also in php.ini, session.auto_start is set as on

Your help with some code examples will be much appreciated.

ekremkaraca
  • 1,453
  • 2
  • 18
  • 37
Azhar
  • 11
  • 3
  • Try article [**php-sessions-across-sub-domains**](http://stackoverflow.com/questions/1064243/php-sessions-across-sub-domains) or [**php-session-is-getting-reset-between-subdomains**](http://stackoverflow.com/questions/11653603/php-session-is-getting-reset-between-subdomains) may these article's link help you. – Aman Jun 06 '14 at 10:10
  • Possible duplicate: http://stackoverflow.com/questions/1064243/php-sessions-across-sub-domains – Always Learning Forever Jun 07 '14 at 08:46
  • I can't see suhosin.session.cryptua, suhosin.session.cryptdocroot in my phpinfo. rest other things i have added in .htaccess. also on both subdomain session id is defferent – Azhar Jun 07 '14 at 08:57
  • when you dont see the `suhosin` configuration parts on your php.ini, you must **install the suhosin extension** – Adrian Preuss Jun 07 '14 at 09:22
  • Actually it work just by doing session.auto_start and session.cookie_domain but only for one day. so did not get why it is not working now. Any idea? – Azhar Jun 07 '14 at 10:01

0 Answers0