session_start() intermittently fails on the same page, then works, then works, then fails..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • comp.lang.php

    session_start() intermittently fails on the same page, then works, then works, then fails..

    I am using session_start() on index.php and for some reason sometimes
    it'll fail. No warnings, no errors, no notices, not even after
    prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
    before session_start() do I see anything, it just plain dies.

    I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
    thus everything seems OK except that it's dying on session_start() .

    Sometimes.

    I'll go and refresh the page and then POOF everything is just fine, the
    page delivers. I'll refresh a few more times to test and then after 2
    - 3 times it fails again. Then works again. Then fails again. On and
    on intermittently.

    I can't find anything online that addresses such an unusual problem,
    but what on earth do I do?

    Phil

  • comp.lang.php

    #2
    Re: session_start() intermittently fails on the same page, then works, then works, then fails..


    comp.lang.php wrote:
    I am using session_start() on index.php and for some reason sometimes
    it'll fail. No warnings, no errors, no notices, not even after
    prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
    before session_start() do I see anything, it just plain dies.
    >
    I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
    thus everything seems OK except that it's dying on session_start() .
    >
    Sometimes.
    >
    I'll go and refresh the page and then POOF everything is just fine, the
    page delivers. I'll refresh a few more times to test and then after 2
    - 3 times it fails again. Then works again. Then fails again. On and
    on intermittently.
    >
    I can't find anything online that addresses such an unusual problem,
    but what on earth do I do?
    Finally was able to produce the fatal error:

    Fatal error: session_start() : Failed to initialize storage module: user
    (path: /var/lib/php/session) in
    /var/www/html/tools/app/include/code_header_scr ipt.inc.php on line 21
    >
    Phil

    Comment

    • comp.lang.php

      #3
      Re: session_start() intermittently fails on the same page, then works, then works, then fails..


      comp.lang.php wrote:
      comp.lang.php wrote:
      I am using session_start() on index.php and for some reason sometimes
      it'll fail. No warnings, no errors, no notices, not even after
      prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
      before session_start() do I see anything, it just plain dies.

      I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
      thus everything seems OK except that it's dying on session_start() .

      Sometimes.

      I'll go and refresh the page and then POOF everything is just fine, the
      page delivers. I'll refresh a few more times to test and then after 2
      - 3 times it fails again. Then works again. Then fails again. On and
      on intermittently.

      I can't find anything online that addresses such an unusual problem,
      but what on earth do I do?
      >
      Finally was able to produce the fatal error:
      >
      Fatal error: session_start() : Failed to initialize storage module: user
      (path: /var/lib/php/session) in
      /var/www/html/tools/app/include/code_header_scr ipt.inc.php on line 21
      >
      Apparently I am not alone: http://bugs.php.net/bug.php?id=25876

      Phil
      Phil

      Comment

      • theCancerus

        #4
        Re: session_start() intermittently fails on the same page, then works, then works, then fails..

        we can go arround this error by simply passing session_id in url.
        PHPSESSID

        comp.lang.php wrote:
        comp.lang.php wrote:
        comp.lang.php wrote:
        I am using session_start() on index.php and for some reason sometimes
        it'll fail. No warnings, no errors, no notices, not even after
        prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
        before session_start() do I see anything, it just plain dies.
        >
        I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
        thus everything seems OK except that it's dying on session_start() .
        >
        Sometimes.
        >
        I'll go and refresh the page and then POOF everything is just fine, the
        page delivers. I'll refresh a few more times to test and then after 2
        - 3 times it fails again. Then works again. Then fails again. On and
        on intermittently.
        >
        I can't find anything online that addresses such an unusual problem,
        but what on earth do I do?
        Finally was able to produce the fatal error:

        Fatal error: session_start() : Failed to initialize storage module: user
        (path: /var/lib/php/session) in
        /var/www/html/tools/app/include/code_header_scr ipt.inc.php on line 21
        >
        >
        Apparently I am not alone: http://bugs.php.net/bug.php?id=25876
        >
        Phil
        Phil

        Comment

        • comp.lang.php

          #5
          Re: session_start() intermittently fails on the same page, then works, then works, then fails..


          theCancerus wrote:
          we can go arround this error by simply passing session_id in url.
          PHPSESSID
          >
          Actually that doesn't work either, it dies all the same if PHPSESSID is
          in the query string or not (?PHPSESSID=... )

          Phil

          comp.lang.php wrote:
          comp.lang.php wrote:
          comp.lang.php wrote:
          I am using session_start() on index.php and for some reason sometimes
          it'll fail. No warnings, no errors, no notices, not even after
          prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
          before session_start() do I see anything, it just plain dies.

          I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
          thus everything seems OK except that it's dying on session_start() .

          Sometimes.

          I'll go and refresh the page and then POOF everything is just fine, the
          page delivers. I'll refresh a few more times to test and then after 2
          - 3 times it fails again. Then works again. Then fails again. On and
          on intermittently.

          I can't find anything online that addresses such an unusual problem,
          but what on earth do I do?
          >
          Finally was able to produce the fatal error:
          >
          Fatal error: session_start() : Failed to initialize storage module: user
          (path: /var/lib/php/session) in
          /var/www/html/tools/app/include/code_header_scr ipt.inc.php on line 21
          >
          Apparently I am not alone: http://bugs.php.net/bug.php?id=25876

          Phil
          Phil

          Comment

          • Gufo Rosso

            #6
            Re: session_start() intermittently fails on the same page, then works, then works, then fails..


            "comp.lang. php" <phillip.s.powe ll@gmail.comha scritto nel messaggio
            news:1165596014 .394396.62330@f 1g2000cwa.googl egroups.com...
            I am using session_start() on index.php and for some reason sometimes
            it'll fail. No warnings, no errors, no notices, not even after
            prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
            before session_start() do I see anything, it just plain dies.
            >
            I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
            thus everything seems OK except that it's dying on session_start() .
            >
            Sometimes.
            <?php
            session_start() ;
            include("other_ file.php");
            echo "......etc

            this code is good

            <?php
            include("sessio n_start.php");
            this code is NOT found correctly









            Comment

            • comp.lang.php

              #7
              Re: session_start() intermittently fails on the same page, then works, then works, then fails..


              Gufo Rosso wrote:
              "comp.lang. php" <phillip.s.powe ll@gmail.comha scritto nel messaggio
              news:1165596014 .394396.62330@f 1g2000cwa.googl egroups.com...
              I am using session_start() on index.php and for some reason sometimes
              it'll fail. No warnings, no errors, no notices, not even after
              prepending error_reporting (E_ALL) and ini_set('displa y_errors', TRUE)
              before session_start() do I see anything, it just plain dies.

              I used LiveHTTPHeaders to verify that I am getting a 200 OK response,
              thus everything seems OK except that it's dying on session_start() .

              Sometimes.
              >
              <?php
              session_start() ;
              include("other_ file.php");
              echo "......etc
              >
              this code is good
              >
              and this code breaks sometimes, producing a fatal error involving the
              supposed value of session.save_ha ndler, which in php.ini is "files" but
              it thinks it's "user" even if I set it via ini_set() to "files" anyway
              <?php
              include("sessio n_start.php");
              this code is NOT found correctly
              Why would I write that, that is obviously wrong

              Comment

              Working...