#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    29
    Rep Power
    0
    Hi!
    This is my first post, so if I can find this information elsewhere on this site, please don't hesitate to tell me!

    Anyway, here is the problem that I have:
    I'm trying to interpret the following code:
    <b>
    <?php
    session_start();
    Session_register('count');
    $count++;
    echo "You've been here <b>$count</b> times!";
    ?>
    </b>
    to which I get the following error:
    <b>
    Warning: open(/tmp/sess_be175ad85c532be54abde22dc9e91dba, O_RDWR) failed: m (2) in crogram filesapache groupapachehtdocscount_me.php on line 3
    You've been here 1 times!
    Warning: open(/tmp/sess_be175ad85c532be54abde22dc9e91dba, O_RDWR) failed: m (2) in Unknown on line 0

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

    I went into the php3.ini and changed the session.save_path to c:windowstemp, but that didn't change anything. What could be possibly causing this? I am running apache on win98.

    By the way, I am also wondering where this title is configured (php3.ini that is) because if I change it to php.ini, it stops working.

    Thanks in advance!

    Laz
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    32
    Rep Power
    15
    Make sure your autoexec.bat conatins the lines:

    set temp=c:windowstemp
    set tmp=c:windowstemp

    Or you could just create a c:tmp directory...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    29
    Rep Power
    0
    Thanks for the reply!
    I've tried making a /tmp directory, but the same thing is happening. Where exactly should it be? In the php directory? In apache directory?
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 1999
    Location
    Chennai, TN, India
    Posts
    1
    Rep Power
    0
    Make sure you tmp directory has write permissions. I think it should work fine.

    Thanks
    Bharath

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Laz:
    Thanks for the reply!
    I've tried making a /tmp directory, but the same thing is happening. Where exactly should it be? In the php directory? In apache directory?
    [/quote]

  8. #5
  9. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    Since you are using Windows you need to change the path setting for session.save_path in php.ini to something that Windows understands. You currently have it set to /tmp which is for *nix. Change it to:

    c:windowstemp
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    29
    Rep Power
    0
    Thanks for the suggestions.
    Here is what I did:
    1. Changed session.save_path in c:windowsphp3.ini to c:windowstemp
    2. Changed all instances of session.save_path I could find in all php related files I could find.
    3. Tried creating a tmp directory in my php istallation directory (chp3) and in the apache htdocs directory.
    4. Changed the autoexec as suggested above.
    I still get the same damn message.
    I used to have php3 installed before, then overwrote it with 4 - perhaps this could be the cause? Anyway, thanks for reading through all that - keep throwing ideas at me, I will be happy to try them out.

    Laz
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    8
    Rep Power
    0
    This all sounds great, but there's one BIG problem. The php3.ini file format is NOT compatible with the php.ini format (for PHP4). In fact, php4's ini files frequently changed format between beta releases. Copy the ini-dist file from your PHP4 distribution into the windows folder, rename it php.ini (it won't screw with your PHP3 install if you still use it), and turn all the options back to what you want them.

    Repeat: you cannot just rename your php3.ini file to php.ini. PHP just won't work properly (on my test machine it didn't work at all). Good luck

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Laz:
    Thanks for the suggestions.
    Here is what I did:
    1. Changed session.save_path in c:windowsphp3.ini to c:windowstemp
    2. Changed all instances of session.save_path I could find in all php related files I could find.
    3. Tried creating a tmp directory in my php istallation directory (chp3) and in the apache htdocs directory.
    4. Changed the autoexec as suggested above.
    I still get the same damn message.
    I used to have php3 installed before, then overwrote it with 4 - perhaps this could be the cause? Anyway, thanks for reading through all that - keep throwing ideas at me, I will be happy to try them out.

    Laz
    [/quote]



    ------------------
    --
    Does anyone else find it kinda perverse that we're using a Perl BBS to discuss PHP? ;-)

Similar Threads

  1. session object variable problem... urgent plz
    By hatembr in forum ASP Programming
    Replies: 2
    Last Post: February 11th, 2004, 02:14 AM
  2. session problem
    By lmy52 in forum PHP Development
    Replies: 10
    Last Post: February 6th, 2004, 02:19 AM
  3. Major session problem suddenly occured!
    By njcallen in forum PHP Development
    Replies: 7
    Last Post: February 3rd, 2004, 07:31 PM
  4. weird session problem
    By Germanjulian in forum PHP Development
    Replies: 1
    Last Post: January 21st, 2004, 11:51 PM
  5. create session problem
    By jomjohn in forum Perl Programming
    Replies: 0
    Last Post: January 16th, 2004, 05:12 AM

IMN logo majestic logo threadwatch logo seochat tools logo