Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Thanked 1 Time in 1 Post

    Sessions across sub domains

    I am trying to use the same session on all my subdomains but it is not working.

    I added the follwoing line to my php.ini session.cookie_domain = .domain.com but this does not solve the problem. any other suggestions of what I shoild do?

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Denver, Colorado USA
    Thanked 339 Times in 331 Posts
    Did you stop and start your web server to get any changes made to php.ini to take effect?

    Did you confirm that the value was changed using a phpinfo(); statement in a .php file?

    Also, only cookies set after the change will work across the subdomains.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts