Cannot set session into folder and retrieve it into root

Discussion in 'PHP' started by gplaurin, Apr 16, 2010.

  1. #1
    Hi!
    So I have little problem here, it seem that I cannot set a session in my file: /ajax/connection.php and access it in my file /index.php. When I copy connection.php to the root folder and set my session it work... anyone know why?

    Thanks !

    GP

    Update:
    If I set a session in the root folder I can access it but If I call session_start() into the any folder my session will be erased.
     
    Last edited: Apr 16, 2010
    gplaurin, Apr 16, 2010 IP
  2. gplaurin

    gplaurin Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok so I know why... in my public_html folder I have a php.ini file and it seems like it was the "problem"... even if I empty it just to have this file was getting me this bug.

    GP
     
    gplaurin, Apr 17, 2010 IP
  3. frank100

    frank100 Peon

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    really ...
    rather than location of the php.ini i think some setting of php.ini may be causing the problem
    rather than removing that file
    if you investigate what is causing the problem,better for you for future
     
    frank100, Apr 17, 2010 IP
  4. gplaurin

    gplaurin Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nop I try removing all settings in my php.ini and same result, just an empty php.ini was causing this.
     
    gplaurin, Apr 18, 2010 IP