SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2001
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    session file not work, help please

    Hello

    I have very simple file session.php to count times of visit

    ======================
    <?
    session_start();
    session_register("SESSION");

    if (! isset($SESSION)) {
    $SESSION["count"] = 0;
    echo "<li>Counter initialized, please reload this page to see it increment";
    } else {
    echo "<li>Waking up session $PHPSESSID";
    $SESSION["count"]++;
    }
    echo "<li>The counter is now $SESSION[count] ";
    ?>
    ==========================

    However, when I run (use browser) I got error. I thought I configed something wrong with /tmp folder

    (However, my config works well with other .php files)

    Thank you very much for help
    john



    Here is error I get:
    ===============
    Warning: open(/tmp\sess_fbd5d522b7e9c5accee70ef0a9a89e0e, O_RDWR) failed: m (2) in c:\apache\htdocs\session.php on line 2

    Counter initialized, please reload this page to see it increment
    The counter is now 0
    Warning: open(/tmp\sess_fbd5d522b7e9c5accee70ef0a9a89e0e, O_RDWR) failed: m (2) in Unknown on line 0

    Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

    =======================

  2. #2
    SitePoint Zealot cokeman's Avatar
    Join Date
    Dec 2000
    Location
    So. California
    Posts
    173
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Silly question, but do you have a C:\TMP folder? (I use PHP on *nix, so I'm not sure what the M$ world needs)...


Bookmarks

Posting Permissions

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