Hello,
I'm having a problem, it happens that the user logs on to www.mysite.com his session does not stay in mysite.com, why does it have this difference of www and www?
Can anyone help me?
I'm setting the session normally
session_start ();
Hello,
I'm having a problem, it happens that the user logs on to www.mysite.com his session does not stay in mysite.com, why does it have this difference of www and www?
Can anyone help me?
I'm setting the session normally
session_start ();
It has to do with the domain. Some domains are natively suaite.com.br or www.seusite.com.br.
Try setting up the CNAME for your hosting. Some DNSs should point to different places. Consequently generating different sessions.
Specify a directory where both can save the session. To do this, use session_save_path () . Read the documentation, the syntax looks something like this:
<?php
ini_set('session.save_path',realpath(dirname($_SERVER['DOCUMENT_ROOT']) . '/../session'));
session_start();
?>