Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Cannot send session cookie - headers already sent

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 101
    Comment on it

    Welcome to FindNerd.
    We sometime get the error- can not send session cookie - headers already sent while we use the session. When we start the start the session with the help of session_start, it means we are ready to use the session. To avoid the error we need to try these things. Please have a look.

    A) session_start should be before any output.

    B) You can use the ob_start function before session_start function to cache any output.

    C) session.save_path should be valid set in php.ini.

    D) Something we can see this error due to the character encoding specially in 32 bits system. Editor can change the file encoding to UTF-8. You need to change it in ANSI.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: