session_start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • underscore
    New Member
    • Jul 2007
    • 30

    session_start

    am new in php when i include the session_start() in my php code i encounter this problem.. can u help me.


    Warning: session_start() : open(/tmp\sess_0f7ca1 f5efc3045f1e829 214ed1eb086, O_RDWR) failed: No such file or directory (2) in D:\MyPage\login .php on line 2

    Warning: session_start() : Cannot send session cookie - headers already sent by (output started at D:\MyPage\login .php:2) in D:\MyPage\login .php on line 2

    Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at D:\MyPage\login .php:2) in D:\MyPage\login .php on line 2
  • dafodil
    Contributor
    • Jul 2007
    • 389

    #2
    Originally posted by underscore
    am new in php when i include the session_start() in my php code i encounter this problem.. can u help me.


    Warning: session_start() : open(/tmp\sess_0f7ca1 f5efc3045f1e829 214ed1eb086, O_RDWR) failed: No such file or directory (2) in D:\MyPage\login .php on line 2

    Warning: session_start() : Cannot send session cookie - headers already sent by (output started at D:\MyPage\login .php:2) in D:\MyPage\login .php on line 2

    Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at D:\MyPage\login .php:2) in D:\MyPage\login .php on line 2
    Do you have an include at the beginning?
    Let me see your code...

    Comment

    • underscore
      New Member
      • Jul 2007
      • 30

      #3
      i got only a sample in PHP books and i tried it in my computer if would be work.
      i have also test some sample in PHP books but d same problem in sesion_start(). dr s no include before the session_start() .

      Comment

      • nathj
        Recognized Expert Contributor
        • May 2007
        • 937

        #4
        Originally posted by underscore
        i got only a sample in PHP books and i tried it in my computer if would be work.
        i have also test some sample in PHP books but d same problem in sesion_start(). dr s no include before the session_start() .
        Could you post up the code you are using? Don't forget the 'code' tags.

        nathj

        Comment

        • kovik
          Recognized Expert Top Contributor
          • Jun 2007
          • 1044

          #5
          The second and third errors imply that you have made output to the screen on line two, but that is caused by the first error's output, so when you fix the first error, you should be fine.

          The first error, however, isn't so obvious. Is this a local installation? It looks to me as though PHP does not have full permission to the directory that it is attempting to save sessions in.

          Comment

          • underscore
            New Member
            • Jul 2007
            • 30

            #6
            Originally posted by volectricity
            The second and third errors imply that you have made output to the screen on line two, but that is caused by the first error's output, so when you fix the first error, you should be fine.

            The first error, however, isn't so obvious. Is this a local installation? It looks to me as though PHP does not have full permission to the directory that it is attempting to save sessions in.
            yes it is local installation. i thnk ur right that the php does not have full permission to the directory. so what shold i do?

            Comment

            • kovik
              Recognized Expert Top Contributor
              • Jun 2007
              • 1044

              #7
              Is your server set up on Windows?

              Comment

              • underscore
                New Member
                • Jul 2007
                • 30

                #8
                yes i am using windows xp

                Comment

                • kovik
                  Recognized Expert Top Contributor
                  • Jun 2007
                  • 1044

                  #9
                  Originally posted by underscore
                  yes i am using windows xp
                  Look into your php.ini and you should find a directive called session.save_pa th (or something of that nature) and it will likely be commented out. Uncomment it and give it an absolute path to some folder (any should work) and see if it works.

                  Comment

                  Working...