Jump to content

Recommended Posts

Typically, a sub domain is just another directory in the your domains root (ie. domain.com/sub).  It's just DNS settings that make it accessible with the directory name infront of the domain (ie. sub.domain.com)

 

So with that in mind, handle sessions as you normally would.  Use session_start(); at the top of each page you are passing it to, and if in a shared hosting environment, consider storing session information in a database.

Okay so using this:

session_set_cookie_params(0, '/', '.example.com'); 
session_start(); 

 

Would do the trick? and thats secure, correct? I'm confused with the "set_cookie".. is that setting a cookie to your browser with session data in it? If so.. that can't be very secure I would imagine..  :shrug:

Secure: If TRUE cookie will only be sent over secure connections.

can you define "secure connection"?

 

Thanks again

ah alright, so just the id of the session, no other data. Feeling better about this lol.

 

Instead of using that code I posted, does setting this option: session.cookie_domain = .mydomain.com

in the php.ini file gunna do the same? Because it seems much more simpler to just do it that way.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.