session_write_close() failing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Brecher

    session_write_close() failing

    (As a *nix newbie) I think this is more of a system configuration problem
    than a php language problem, but I'm not sure where else to go for help.
    I'm trying to install phpMyAdmin on a linux shared hosting account. When I
    run it (load phpMyAdmin's index.php with a browser), I get the following
    three Warnings, and no other output:

    Warning: session_write_c lose():
    open(/tmp/php-ses/sess_0c21c95414 d34dd67d6adf9ab 3de88f6, O_RDWR) failed: No
    such file or directory (2)

    Warning: session_write_c lose(): Failed to write session data (files). Please
    verify that the current setting of session.save_pa th is correct
    (/tmp/php-ses)

    Warning: Cannot modify header information - headers already sent by (output
    started at [the session_write_c lose() call above])

    session_write_c lose(); is the first statement that phpMyAdmin executes
    after a couple of require_once's for .lib files. The third warning is
    generated by...
    // start output
    header('Content-Type: text/html; charset=' . $GLOBALS['charset']);

    phpinfo() shows that session support is enabled, and session_save_pa th is
    /tmp/php-ses

    If I call the hosting provider's tech support, I get, "sorry, we don't help
    with scripting problems." Is there something specific that I can say needs
    changing in their configuration? ... or, any helpful ideas would be very
    appreciated.

    --
    For mail, please use my surname where indicated:
    steve@surname.r eno.nv.us (Steve Brecher)


  • Jerry Stuckle

    #2
    Re: session_write_c lose() failing

    Steve Brecher wrote:[color=blue]
    > (As a *nix newbie) I think this is more of a system configuration problem
    > than a php language problem, but I'm not sure where else to go for help.
    > I'm trying to install phpMyAdmin on a linux shared hosting account. When I
    > run it (load phpMyAdmin's index.php with a browser), I get the following
    > three Warnings, and no other output:
    >
    > Warning: session_write_c lose():
    > open(/tmp/php-ses/sess_0c21c95414 d34dd67d6adf9ab 3de88f6, O_RDWR) failed: No
    > such file or directory (2)
    >
    > Warning: session_write_c lose(): Failed to write session data (files). Please
    > verify that the current setting of session.save_pa th is correct
    > (/tmp/php-ses)
    >
    > Warning: Cannot modify header information - headers already sent by (output
    > started at [the session_write_c lose() call above])
    >
    > session_write_c lose(); is the first statement that phpMyAdmin executes
    > after a couple of require_once's for .lib files. The third warning is
    > generated by...
    > // start output
    > header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
    >
    > phpinfo() shows that session support is enabled, and session_save_pa th is
    > /tmp/php-ses
    >
    > If I call the hosting provider's tech support, I get, "sorry, we don't help
    > with scripting problems." Is there something specific that I can say needs
    > changing in their configuration? ... or, any helpful ideas would be very
    > appreciated.
    >[/color]

    So, does /tmp/php-ses exist, and does it have the correct permissions?


    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Steve Brecher

      #3
      Re: session_write_c lose() failing

      I wrote:[color=blue]
      > (As a *nix newbie) I think this is more of a system configuration
      > problem than a php language problem, but I'm not sure where else to
      > go for help. I'm trying to install phpMyAdmin on a linux shared
      > hosting account. When I run it (load phpMyAdmin's index.php with a
      > browser), I get the following three Warnings, and no other output:
      >
      > Warning: session_write_c lose():
      > open(/tmp/php-ses/sess_0c21c95414 d34dd67d6adf9ab 3de88f6, O_RDWR)
      > failed: No such file or directory (2)
      > [etc.][/color]

      Solution -- insert:
      session_save_pa th ('/absolute/path/to/local/sessions/directory/');
      at the start of phpMyAdmin's libraries/session.inc.php , where the string
      argument is of course a "self-documenting dummy"(tm).

      --
      For mail, please use my surname where indicated:
      steve@surname.r eno.nv.us (Steve Brecher)


      Comment

      • Steve Brecher

        #4
        Re: session_write_c lose() failing

        I wrote:[color=blue]
        > I wrote:[color=green]
        >> (As a *nix newbie) I think this is more of a system configuration
        >> problem than a php language problem, but I'm not sure where else to
        >> go for help. I'm trying to install phpMyAdmin on a linux shared
        >> hosting account. When I run it (load phpMyAdmin's index.php with a
        >> browser), I get the following three Warnings, and no other output:
        >>
        >> Warning: session_write_c lose():
        >> open(/tmp/php-ses/sess_0c21c95414 d34dd67d6adf9ab 3de88f6, O_RDWR)
        >> failed: No such file or directory (2)
        >> [etc.][/color]
        >
        > Solution -- insert:
        > session_save_pa th ('/absolute/path/to/local/sessions/directory/');
        > at the start of phpMyAdmin's libraries/session.inc.php , where the
        > string argument is of course a "self-documenting dummy"(tm).[/color]

        I forgot to mention some context. The key was finding this from the hosting
        provider: "customers cannot use the default PHP session path in /tmp.
        Instead, sessions will need to be saved in each account’s home directory."

        --
        For mail, please use my surname where indicated:
        steve@surname.r eno.nv.us (Steve Brecher)


        Comment

        Working...