Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    session_start keeps failing

    session_starts keeps failing on me.

    Warning: open(/tmp\sess_e90df8e8abbd681f42610b9bd5592681, O_RDWR) failed: m (2) in c:\phpdev\www\website\login.php on line 32

    I'm using Windows XP Professional and I downloaded the appropriate phpdev package to play with.

    Is there a way to fix this or perhaps another way to do the same thing?

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    phpdev4 or phpdev5beta?

    Can you post your code?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    hi the default temp dir (for sessions) in phpdev is c:\phpdev\php\temp

    and the same for dev5beta but $X:\$install_dir\php\temp

    but I know for some peeps with phpdev4 the temp dir ever gets created? so if it does not exist then just create it

    but it looks like your application in speciying its own session directory? in which case again, you need to create that directory which I think would translate in your case to
    $X:\$install_dir\www\tmp

    ?? give it a blast
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The error just happens whenever I run session_start(), or if I run session_register() without session_start().

    I really don't think it has anything to do with my code.

    I tried creating some new folders in different places, but I cannot get it to work--still the same error. I think the error looks funny though, with both a / and a \ slash. Is it supposed to do that?

    Here is my php.ini session section:

    [Session]
    ; Handler used to store/retrieve data.
    session.save_handler = files

    ; Argument passed to save_handler. In the case of files, this is the path
    ; where data files are stored.
    session.save_path = C:\phpdev\php\temp;

    ; Whether to use cookies.
    session.use_cookies = 1


    ; Name of the session (used as cookie name).
    session.name = PHPSESSID

    ; Initialize session on request startup.
    session.auto_start = 0

    ; Lifetime in seconds of cookie or, if 0, until browser is restarted.
    session.cookie_lifetime = 0

    ; The path for which the cookie is valid.
    session.cookie_path = /

    ; The domain for which the cookie is valid.
    session.cookie_domain =

    ; Handler used to serialize data. php is the standard serializer of PHP.
    session.serialize_handler = php

    ; Percentual probability that the 'garbage collection' process is started
    ; on every session initialization.
    session.gc_probability = 1

    ; After this number of seconds, stored data will be seen as 'garbage' and
    ; cleaned up by the garbage collection process.
    session.gc_maxlifetime = 1440

    ; Check HTTP Referer to invalidate externally stored URLs containing ids.
    session.referer_check =

    ; How many bytes to read from the file.
    session.entropy_length = 0

    ; Specified here to create the session id.
    session.entropy_file =

    ;session.entropy_length = 16

    ;session.entropy_file = /dev/urandom

    ; Set to {nocache,private,public} to determine HTTP caching aspects.
    session.cache_limiter = nocache

    ; Document expires after n minutes.
    session.cache_expire = 180

    ; use transient sid support if enabled by compiling with --enable-trans-sid.
    session.use_trans_sid = 1

    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Have you alredy verified that the temp directory exists here?

    C:\phpdev\php\temp

    Also what OS are you running?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #6
    New Coder
    Join Date
    Jul 2002
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Yes

    That directory exists and numerous others that could possibly work as well, but I can't get it working.

    I'm using Windows XP Professional


  •  

    Posting Permissions

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