Results 1 to 6 of 6

Thread: [RESOLVED] problem with session: "Cannot send session cookie"

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2006
    Location
    Iran
    Posts
    48

    Resolved [RESOLVED] problem with session: "Cannot send session cookie"

    hi
    i write only below code in "index.php":
    PHP Code:
    <?php
    session_start
    ();
    ?>
    but i see this error:
    Code:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at J:\wamp\www\Project\index.php:1) in J:\wamp\www\Project\index.php on line 2
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at J:\wamp\www\Project\index.php:1) in J:\wamp\www\Project\index.php on line 2
    i don't send any thing for output but this error is show.
    please help me. what i do?
    Sorry For Bad My English

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: problem with session: "Cannot send session cookie"

    is there any includes, html, or php above that code?
    My usual boring signature: Something

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: problem with session: "Cannot send session cookie"

    Please upload the file. Remember, that even whitespace before the opening PHP tag counts as output.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2006
    Location
    Iran
    Posts
    48

    Re: problem with session: "Cannot send session cookie"

    no no. i use only attached code
    Attached Files Attached Files
    Sorry For Bad My English

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: problem with session: "Cannot send session cookie"

    I opened your file in a hex editor and there appears to be 3 bytes preceding the <?php. I uploaded the file to my server and although I got no error I did get a junk string:

    http://adam.codedv.com/shamsoft/index.php

    Did you create and save this file as unicode? Ensure that when you save, you select ANSI as your encoding and not unicode.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Member
    Join Date
    Dec 2006
    Location
    Iran
    Posts
    48

    Re: problem with session: "Cannot send session cookie"

    thank visualAd
    i save my file as UTF-8
    i newcomer to PHP and my english is ill too
    Sorry For Bad My English

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width