Jump to content

Managing session of 'mydomain2.com' from 'mydomain1.com'


Recommended Posts

Hi.

Working with PHP 4, I want to manage sessions for users visiting 'mydomain2.com' by using a PHP script within 'mydomain1.com' (They both are in the same web server)

I find some problems, cause 'mydomain1.com' script doesn't identify user visiting 'mydomain2.com'. I tried to use
-------
php_value session.cookie_domain "mydomain1.com"
------
within 'mydomain2.com' Apache configuration, but it doesn't work (I suppose it doesn't anything to do with cookies, right?).

Any suggestion is appreciated. Thank you very much.
in cookies you can specify 2 domain name to transfer your session from one domain to other one if they exist on the same server.

setcookie("usuario", "Luis", time()+3600,"/","domain2.com");

and use cookie everywhere to manage session.using $_COOKIE[]
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.