Can someone explain this error to me? :(

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Maciej Nadolski

    #1

    Can someone explain this error to me? :(

    Hi!
    I can`t understand what php wants from me:( So:
    Cannot send session cache limiter - headers already sent (output started at
    /home/krecik/public_html/silnik.php:208) in /home/krecik/public_html/silnik.php on
    line 251

    Line 208: print ( "error: " . mysql_error());
    Line 251: session_registe r("uprawnienia" , "zalogowany ");

    I can understand that sth, is wrong in line 251 after line 208 and it is logical to
    me, but I have no idea what possibly could be wrong with line 208.
    Yes I know that that it`s better to store session information on server. I already
    asked admin to change variable in php.ini.

    --
    Best regards,
    Maciej Nadolski
  • Virgil Green

    #2
    Re: Can someone explain this error to me? :(

    "Maciej Nadolski" <usenet@WYTNI J-TO.nadolski.net > wrote in message
    news:Xns940CB88 4B6335usenetnad olskinet@193.11 0.122.80...[color=blue]
    > Hi!
    > I can`t understand what php wants from me:( So:
    > Cannot send session cache limiter - headers already sent (output started[/color]
    at[color=blue]
    > /home/krecik/public_html/silnik.php:208) in[/color]
    /home/krecik/public_html/silnik.php on[color=blue]
    > line 251
    >
    > Line 208: print ( "error: " . mysql_error());
    > Line 251: session_registe r("uprawnienia" , "zalogowany ");
    >
    > I can understand that sth, is wrong in line 251 after line 208 and it is[/color]
    logical to[color=blue]
    > me, but I have no idea what possibly could be wrong with line 208.
    > Yes I know that that it`s better to store session information on server. I[/color]
    already[color=blue]
    > asked admin to change variable in php.ini.[/color]

    Was your session started at the beginning of the script?

    - Virgil


    Comment

    • Maciej Nadolski

      #3
      Re: Can someone explain this error to me? :(

      "Virgil Green" <vjg@obsydian.c om> wrote in
      news:UBggb.549$ g56.410262689@n ewssvr30.news.p rodigy.com:
      [color=blue]
      >
      > Was your session started at the beginning of the script?
      >[/color]
      Nope.
      I only set this:
      session_cache_e xpire(3600);
      I`m not sure is it setting of a session...

      --
      Best regards,
      Maciej Nadolski

      Comment

      • Jørn-Inge Kristiansen

        #4
        Re: Can someone explain this error to me? :(

        "Maciej Nadolski" <usenet@WYTNI J-TO.nadolski.net > wrote in message
        news:Xns940CB88 4B6335usenetnad olskinet@193.11 0.122.80...[color=blue]
        > Hi!
        > I can`t understand what php wants from me:( So:
        > Cannot send session cache limiter - headers already sent (output started[/color]
        at[color=blue]
        > /home/krecik/public_html/silnik.php:208) in[/color]
        /home/krecik/public_html/silnik.php on[color=blue]
        > line 251
        >
        > Line 208: print ( "error: " . mysql_error());
        > Line 251: session_registe r("uprawnienia" , "zalogowany ");
        >
        > I can understand that sth, is wrong in line 251 after line 208 and it is[/color]
        logical to[color=blue]
        > me, but I have no idea what possibly could be wrong with line 208.
        > Yes I know that that it`s better to store session information on server. I[/color]
        already[color=blue]
        > asked admin to change variable in php.ini.
        >
        > --
        > Best regards,
        > Maciej Nadolski[/color]


        all session stuff, like registering variables, has do be done befor you
        "print" any html code, because then the train has gone ;)


        Comment

        • Maciej Nadolski

          #5
          Re: Can someone explain this error to me? :(

          "Jrrn-Inge Kristiansen" <jorninge@stud. ntnu.no> wrote in
          news:blsc8d$mc$ 1@tyfon.itea.nt nu.no:
          [color=blue]
          > all session stuff, like registering variables, has do be done befor
          > you "print" any html code, because then the train has gone ;)[/color]
          Thanks.

          --
          Best regards,
          Maciej Nadolski

          Comment

          • Maciej Nadolski

            #6
            Re: Can someone explain this error to me? :(

            "Jrrn-Inge Kristiansen" <jorninge@stud. ntnu.no> wrote in
            news:blsc8d$mc$ 1@tyfon.itea.nt nu.no:
            [color=blue]
            >
            > all session stuff, like registering variables, has do be done befor
            > you "print" any html code, because then the train has gone ;)
            >[/color]

            Now session is started BEFORE user log himself in.
            I eliminated print which in fact there was telling which rights ypu have.
            And I still have something like that:
            Warning: session_registe r(): Cannot send session cache limiter - headers already
            sent (output started at /home/krecik/public_html/funkcje.php:212 ) in
            /home/krecik/public_html/funkcje.php on line 239
            Any more ideas?

            --
            Best regards,
            Maciej Nadolski

            Comment

            • Matthias Esken

              #7
              Re: Can someone explain this error to me? :(

              Maciej Nadolski <usenet@WYTNI J-TO.nadolski.net > schrieb:
              [color=blue]
              > I eliminated print which in fact there was telling which rights ypu have.
              > And I still have something like that:
              > Warning: session_registe r(): Cannot send session cache limiter - headers already
              > sent (output started at /home/krecik/public_html/funkcje.php:212 ) in
              > /home/krecik/public_html/funkcje.php on line 239
              > Any more ideas?[/color]

              Yes. You have an ouptput in line 212 of the file
              /home/krecik/public_html/funkcje.php

              Regards,
              Matthias

              Comment

              • Maciej Nadolski

                #8
                Re: Can someone explain this error to me? :(

                Matthias Esken <muelleimer2003 nospam@usenetve rwaltung.org> wrote in
                news:blv3pl.15c .1@usenet.esken .de:
                [color=blue]
                > Yes. You have an ouptput in line 212 of the file
                > /home/krecik/public_html/funkcje.php[/color]

                Thanks.

                line 212 looks like this:
                print ( "error: " . mysql_error());
                I still van`t ungerstand what outout then means:( Could someone explain THIS to
                me? :) TIA

                --
                Best regards,
                Maciej Nadolski

                Comment

                • Dalibor Karlovic

                  #9
                  Re: Can someone explain this error to me? :(

                  Maciej Nadolski wrote:
                  [color=blue][color=green]
                  >> Yes. You have an ouptput in line 212 of the file
                  >> /home/krecik/public_html/funkcje.php[/color][/color]
                  [color=blue]
                  > line 212 looks like this:
                  > print ( "error: " . mysql_error());
                  > I still van`t ungerstand what outout then means:( Could someone explain
                  > THIS to me? :) TIA[/color]

                  You have a function which is called prior to session_start() , like this:

                  <?php
                  someMySQLFuncti on();
                  // foo...
                  session_start() ; // or other session_* function
                  ?>

                  If there is an error while talking with MySQL server, your function will
                  issue an error and you cannot send headers after that. Reverse the function
                  calls.

                  --
                  Dado

                  Expect the worst, it's the least you can do.

                  Comment

                  • Matthias Esken

                    #10
                    Re: Can someone explain this error to me? :(

                    Maciej Nadolski <usenet@WYTNI J-TO.nadolski.net > schrieb:
                    [color=blue]
                    > Matthias Esken <muelleimer2003 nospam@usenetve rwaltung.org> wrote in
                    > news:blv3pl.15c .1@usenet.esken .de:
                    >[color=green]
                    >> Yes. You have an ouptput in line 212 of the file
                    >> /home/krecik/public_html/funkcje.php[/color]
                    >
                    > line 212 looks like this:
                    > print ( "error: " . mysql_error());
                    > I still van`t ungerstand what outout then means:( Could someone explain THIS to
                    > me? :) TIA[/color]

                    You're nort allowed to have _any_ output before you use the header()
                    function. print, echo or print_r will generate an output.

                    Regards,
                    Matthias

                    Comment

                    • Pedro

                      #11
                      Re: Can someone explain this error to me? :(

                      Maciej Nadolski wrote:
                      [...][color=blue]
                      > I still van`t ungerstand what outout then means:( Could someone explain THIS to
                      > me? :) TIA[/color]

                      --------
                      <?php
                      echo '<html>';
                      session_start() ; ### error: html was echo'd before the needed
                      ### session_start() call
                      ?>
                      ========


                      or
                      --------
                      <html>
                      <head>
                      <title>test</title>
                      </head>
                      <body>
                      <?php
                      session_start() ; ### error: the first output was "<html>"
                      ?>
                      </body>
                      </html>
                      ========


                      or
                      --------
                      <?php
                      include 'standard.inc.p hp';
                      session_start() ; ### error if standard.inc.ph p outputs anything
                      ### other than other headers
                      ?>
                      <head><head><ti tle>!!!</title></head><body><p>! !!</p></body></html>
                      ========



                      HTH


                      --
                      I have a spam filter working.
                      To mail me include "urkxvq" (with or without the quotes)
                      in the subject line, or your mail will be ruthlessly discarded.

                      Comment

                      • Maciej Nadolski

                        #12
                        Re: Can someone explain this error to me? :(

                        Pedro <hexkid@hotpop. com> wrote in
                        news:bm1n2i$hje 0t$1@ID-203069.news.uni-berlin.de:
                        [color=blue]
                        > --------
                        > <?php
                        > echo '<html>';
                        > session_start() ; ### error: html was echo'd before the needed
                        > ### session_start() call
                        > ?>[/color]

                        Thanks!
                        Now I understand it. Print displaying the error message from mysql and it was the
                        problem. Thanks again for patience.

                        --
                        Best regards,
                        Maciej Nadolski

                        Comment

                        Working...