php session sharing problem

Discussion in 'PHP' started by ars_oguz, Aug 17, 2007.

  1. #1
    hi,
    i save several child sites and a mother site which all shares session info in mysql.
    when user goes to a child site or tries to login, it connects to the mother to create a global session. So when user logged in xx.com and goes to yy.com he will be logged in there also.

    But the problem is that when it goes to yy.com, it redirects it to mother site aa.com to check if there is valid session than aa.com redirects back to yy.com

    this cause 302 Found error in http://www.gritechnologies.com/tools/spider.go
    or some other sites. so i believe that Google will not be able to index my pages.

    How can i fix this problem or how else i can do session sharing among multiple sites.

    Thanks for your help.
     
    ars_oguz, Aug 17, 2007 IP
  2. sabmalik

    sabmalik Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    302 is not an error , it is just a redirect request. So dont about it really. Also Google and other similar sites wont login , thus they dont need sessions. Maybe you can do this.. A simple test to differentiate between a normal user and an SE would be to create a cookie and check if it is accessable. Maybe this will help you out in paving a special path for SEs.
     
    sabmalik, Aug 17, 2007 IP
  3. ars_oguz

    ars_oguz Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i'll try to do such like that but URLs have language variable in them like
    http://www.***.com/en/mobile-phones/all-mobile-phones/most-viewed-mobile-phones/1.html
    so session should be created in order to have valid URLs.

    I am confused and i dont want to remove "one login for all sites" hope i can find a way to solve it...
     
    ars_oguz, Aug 17, 2007 IP
  4. sabmalik

    sabmalik Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    OK i am a senior PHP developer , so you can PM me the link and i can have a look and maybe suggest something.

    One thing you can do is , if you use firefox browser , there is a developer extension which it uses , you should block out cookies and javascript in that and then browse your site , you will exactly know how SEs see your site(s)
     
    sabmalik, Aug 18, 2007 IP
  5. ars_oguz

    ars_oguz Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for your help, problem has been solved ;)
     
    ars_oguz, Aug 18, 2007 IP