Where is my mind ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthias Ainsworth

    #1

    Where is my mind ?

    Hi,

    Strange things happening on my server (a little XP machine...) !
    Session files (sess_xxxxx...) are created well but they remain empty...
    always ! My session variables never get stored !

    I'm stuck.
    Any tip appreciated...

    Matt

    --
    @+


  • Ken Robinson

    #2
    Re: Where is my mind ?


    Matthias Ainsworth wrote:[color=blue]
    > Hi,
    >
    > Strange things happening on my server (a little XP machine...) !
    > Session files (sess_xxxxx...) are created well but they remain[/color]
    empty...[color=blue]
    > always ! My session variables never get stored !
    >[/color]

    Sample code please? Can't debug problems with seeing code.

    Ken

    Comment

    • Matthias Ainsworth

      #3
      Re: Where is my mind ?

      Hi Ken,

      A sample code will not help much...
      But here it is :

      session_start() ;

      if (!isset($_SESSI ON["count"]))
      $_SESSION["count"] = 1;
      else
      $_SESSION["count"] ++;

      echo $_SESSION["count"];

      I know this one works.
      Every time I call this script a new session file is created (I don't know
      why previous is not reused)... and it remains pretty empty.

      Everytime I refresh this page, Apache log file (access.log) reports :

      127.0.0.1 - - [29/Apr/2005:17:35:36 +0200] "GET /test.php HTTP/1.1" 200
      41765
      127.0.0.1 - - [29/Apr/2005:17:35:37 +0200] "GET
      /test.php?=PHPE9 568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
      127.0.0.1 - - [29/Apr/2005:17:35:37 +0200] "GET
      /test.php?=PHPE9 568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974

      Any idea what this is (PHPE...) ? It is not my session ID... so ?

      --
      @+
      "Ken Robinson" <kenrbnsn@rbnsn .com> wrote in message
      news:1114785215 .387235.273580@ z14g2000cwz.goo glegroups.com.. .[color=blue]
      >
      > Matthias Ainsworth wrote:[color=green]
      > > Hi,
      > >
      > > Strange things happening on my server (a little XP machine...) !
      > > Session files (sess_xxxxx...) are created well but they remain[/color]
      > empty...[color=green]
      > > always ! My session variables never get stored !
      > >[/color]
      >
      > Sample code please? Can't debug problems with seeing code.
      >
      > Ken
      >[/color]


      Comment

      • Alvaro G Vicario

        #4
        Re: Where is my mind ?

        *** Matthias Ainsworth wrote/escribió (Fri, 29 Apr 2005 16:01:05 +0200):[color=blue]
        > Strange things happening on my server (a little XP machine...) !
        > Session files (sess_xxxxx...) are created well but they remain empty...
        > always ! My session variables never get stored ![/color]

        Is it an NTFS partition? Does the user Apache runs as have permission to
        write on these files?


        --
        -- Álvaro G. Vicario - Burgos, Spain
        -- http://bits.demogracia.com - Mi sitio sobre programación web
        -- Don't e-mail me your questions, post them to the group
        --

        Comment

        • drwxr-xr-x

          #5
          Re: Where is my mind ?



          Comment

          • coolsti

            #6
            Re: Where is my mind ?

            On Fri, 29 Apr 2005 17:46:15 +0200, Matthias Ainsworth wrote:
            [color=blue]
            > Hi Ken,
            >
            > A sample code will not help much...
            > But here it is :
            >
            > session_start() ;
            >
            > if (!isset($_SESSI ON["count"]))
            > $_SESSION["count"] = 1;
            > else
            > $_SESSION["count"] ++;
            >
            > echo $_SESSION["count"];
            >
            > I know this one works.
            > Every time I call this script a new session file is created (I don't know
            > why previous is not reused)... and it remains pretty empty.
            >
            > Everytime I refresh this page, Apache log file (access.log) reports :
            >
            > 127.0.0.1 - - [29/Apr/2005:17:35:36 +0200] "GET /test.php HTTP/1.1" 200
            > 41765
            > 127.0.0.1 - - [29/Apr/2005:17:35:37 +0200] "GET
            > /test.php?=PHPE9 568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 4459
            > 127.0.0.1 - - [29/Apr/2005:17:35:37 +0200] "GET
            > /test.php?=PHPE9 568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2974
            >
            > Any idea what this is (PHPE...) ? It is not my session ID... so ?[/color]

            It looks like your browser wants to send back the session information
            (session ID) attached to the URL instead of as a cookie. Yet you say this
            is not your session key. Perhaps a misconfiguratio n somewhere? Try to
            force PHP to use cookies (this is done in the php.ini file, use cookies
            only or something like that) and make sure your browser is allowed to use
            cookies, and then see what happens.

            Comment

            Working...