?
Solved

php unable to create sessions on apache windows

Posted on 2003-03-25
5
Medium Priority
?
421 Views
Last Modified: 2008-02-01
Warning: session_start() [function.session-start]: open(/tmp\sess_8d89bcaa20f440c9dd97be163596948a, O_RDWR) failed: No such file or directory (2) in C:\Program Files\Apache Group\Apache2\htdocs\scheduler\login.php on line 8

This is on an Apache 2.0.44(win32) server with php 4.3.1

I have changed:

session.save_path = c:\winnt\temp  (the windows temp directory as suggested in the documentation) and this directory does exist.

The fact that the error is generating "open(/tmp\sess" leads me to believe that the session save directory is still mapped wrong somewhere but i cannot find any other places to change it.

thanks!
0
Comment
Question by:Anexkahn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:VGR
ID: 8208842
don't you see you've a problem of slashes ? (/tmp\sess_8...)

You're on Windows and your [session] section of php.ini was not modified correctly. Look into it.
Change the directory for sessions files repository :
this is not correct
/tmp

put D:\TMP or whatever suits you

0
 
LVL 15

Expert Comment

by:VGR
ID: 8208853
c:\WINNT\php.ini

[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. Note: Windows users have to change this
; variable in order to use PHP's session functions.
;VGR27092002 CHANGEMENT !!!
;VGR01102002 NTFS ou FAT32 requis pour atime() ?
session.save_path = G:\php_sess\

0
 

Author Comment

by:Anexkahn
ID: 8212088
Right, i see it is a problem of slashes, but i can't figure out where its comming up with the /tmp refrence.

I have modified php.ini and also searched the entire file for any other refrences to /tmp and cant find anything.

[Session]
session.save_handler = files
session.save_path = C:\winnt\temp
session.name = PHPSESSID
session.cookie_lifetime = 0
session.cookie_path = \
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_dividend    = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0

0
 
LVL 15

Accepted Solution

by:
VGR earned 200 total points
ID: 8212501
easy 8-) (may-be)

Let's suppose you had TWO (or more) php.ini files on your computer ? :D
0
 

Author Comment

by:Anexkahn
ID: 8213834
Ahh, not quite, but it did point me in the right direction.  Somehow the installsheild installer placed the php.ini file in the user directory and not in the windows system directory.

thanks vgr!
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question