Loading ...
Sorry, an error occurred while loading the content.

Re: [phpXperts] Session problem :

Expand Messages
  • Saiful Islam
    Dear Arif Rahman write session_start() at the first line of stdindex.php. That means i want to say nothing will be write to display before session_start(); As
    Message 1 of 5 , Aug 9, 2011
    • 0 Attachment
      Dear Arif Rahman

      write session_start() at the first line of  stdindex.php. That means i want to say nothing will be write to display before session_start();

      As like :

      <?php 
      echo('Arif');
      session_start();
      ?>
      It is wrong and will give you these type of error.

      You can write in this way:

      <?php 
      session_start();
      echo('Arif');
      ?>

      --
      Saiful Islam
      Gazipur, Bangladesh
      http://saifulbd.com/



      On Tue, Aug 9, 2011 at 10:24 PM, arif_php_duet <arif.rahman1988@...> wrote:
       

      Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\online_reg\webfile\stdindex.php:2) in c:\wamp\www\online_reg\webfile\stdindex.php on line 10

      Please Help me...


    • Anjan Bhowmik
      In your stdindex.php on line 10 please check that you are not accidentally echoing something. Or, check if at line 10 there is an warning generated by php.
      Message 2 of 5 , Aug 9, 2011
      • 0 Attachment
        In your "stdindex.php on line 10" please check that you are not accidentally echoing something. Or, check if at line 10 there is an warning generated by php.

        That should solve it, also as Saiful vai said, u should call session_start() at the top or start of your script. THis helps avoiding these type of problems u r facing now.

        On Tue, Aug 9, 2011 at 10:24 PM, arif_php_duet <arif.rahman1988@...> wrote:
         

        Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\online_reg\webfile\stdindex.php:2) in c:\wamp\www\online_reg\webfile\stdindex.php on line 10

        Please Help me...




        --
        Anjan Bhowmik
        Freelance Software & Web Developer
        M : +880 - 1670 - 556419
        E : anjan011@...info@...
        Site: http://www.onlyfreelancer.com/ - Only for Freelancer's!

      • ymnoor21
        Arif After checking for echo / print function, check for empty spaces in the bottom part of your php file. Thanks Yamin
        Message 3 of 5 , Aug 9, 2011
        • 0 Attachment
          Arif
          After checking for echo / print function, check for empty spaces in the bottom part of your php file.

          Thanks
          Yamin

          --- In phpexperts@yahoogroups.com, "arif_php_duet" <arif.rahman1988@...> wrote:
          >
          > Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\online_reg\webfile\stdindex.php:2) in c:\wamp\www\online_reg\webfile\stdindex.php on line 10
          >
          >
          > Please Help me...
          >
        • Anjan Bhowmik
          yep! good one Yamin vai! This is one reason i never put the trailing ? whenever i can :D ... -- Anjan Bhowmik Freelance Software & Web Developer M : +880 -
          Message 4 of 5 , Aug 9, 2011
          • 0 Attachment
            yep! good one Yamin vai!

            This is one reason i never put the trailing ?> whenever i can :D

            On Wed, Aug 10, 2011 at 10:47 AM, ymnoor21 <ymnoor21@...> wrote:
             

            Arif
            After checking for echo / print function, check for empty spaces in the bottom part of your php file.

            Thanks
            Yamin



            --- In phpexperts@yahoogroups.com, "arif_php_duet" <arif.rahman1988@...> wrote:
            >
            > Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\wamp\www\online_reg\webfile\stdindex.php:2) in c:\wamp\www\online_reg\webfile\stdindex.php on line 10
            >
            >
            > Please Help me...
            >




            --
            Anjan Bhowmik
            Freelance Software & Web Developer
            M : +880 - 1670 - 556419
            E : anjan011@...info@...
            Site: http://www.onlyfreelancer.com/ - Only for Freelancer's!

          Your message has been successfully submitted and would be delivered to recipients shortly.