SESSION HELL
Moderator: General Moderators
- theonomine
- Forum Newbie
- Posts: 3
- Joined: Wed Jun 19, 2002 2:14 am
- Location: Austin, TX
SESSION HELL
I'm running PHP 4.0.6 on Apache 1.3.20 on W2K... Whenever I use start_session(); I get a "Warning: open(/tmp\sess_deb5aa1cd21b323e414a15eb145ec4cc, O_RDWR) failed: m (2) in c:\phpdev\www\sessiontest.php on line 2" and the variable is never carried. I've checked my .ini file and made sure that session.save_handler=files, and the session.save_path=C:\phpdev\php\temp (all necessary privileges have been checked). I've even tried setting the path to C:\temp to no avail. And, yes, PHPINFO() shows the path as \temp like it should. Can anyone help? 
- dlgilbert
- Forum Newbie
- Posts: 6
- Joined: Wed Jun 19, 2002 7:03 am
- Location: Pennsylvania, USA
- Contact:
It's been awhile since I've used PHP on Windows, but here goes...
You said you've checked all the necessary permissions... The IIS web server user is allowed write access to your temp directory?
Also... after you make any changes to php.ini, you'll need to restart IIS (I believe). Restart the entire IIS service, not just the webserver. I think there are 3 entries associated with IIS in the Services panel... webserver, ftp server, and the IIS admin service (which controls the other two). Make sure that you restart the IIS admin service. Rebooting the system also works as well, of course.
Those are the only two things I can think of off the top of my head. I remember having that sort of problem when I had PHP running on NT 4.0, so I wholly sympathize with you. Good luck!
You said you've checked all the necessary permissions... The IIS web server user is allowed write access to your temp directory?
Also... after you make any changes to php.ini, you'll need to restart IIS (I believe). Restart the entire IIS service, not just the webserver. I think there are 3 entries associated with IIS in the Services panel... webserver, ftp server, and the IIS admin service (which controls the other two). Make sure that you restart the IIS admin service. Rebooting the system also works as well, of course.
Those are the only two things I can think of off the top of my head. I remember having that sort of problem when I had PHP running on NT 4.0, so I wholly sympathize with you. Good luck!
try changing
C:\phpdev\php\temp
to:
/phpdev/php/temp
I have your EXACT same specs
(win2k, php 4.0.6, apache 1.3.20) and that is how my php.ini file looks.
Notice how I used the other slash? Once you have edited your PHP.ini file, restart IIS. Or better yet, just reboot the computer.
Hope this helps[/b]
C:\phpdev\php\temp
to:
/phpdev/php/temp
I have your EXACT same specs
Notice how I used the other slash? Once you have edited your PHP.ini file, restart IIS. Or better yet, just reboot the computer.
Hope this helps[/b]
- theonomine
- Forum Newbie
- Posts: 3
- Joined: Wed Jun 19, 2002 2:14 am
- Location: Austin, TX
Session Hell Infinite
First of all, I'm not running IIS. I did what you suggested in changing the path to /phpdev/php/temp to no avail.
Below is the Session area of the php.ini file:
[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 = /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"
Below is the Session area of the php.ini file:
[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 = /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"
- theonomine
- Forum Newbie
- Posts: 3
- Joined: Wed Jun 19, 2002 2:14 am
- Location: Austin, TX
Session Hell Corrected
Yes, yes ... of course. I figured out what the problem was ... although the path specifically names the directory "temp," the folder name has to be "tmp." Once I renamed it, everything worked! Thanks for your time and effort in replying. 