Session save path.... wont work?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Josh - Guest
Guest





PostPosted: Mon Dec 09, 2002 12:12 am    Post subject: Session save path.... wont work? Reply with quote

Yeah, I tried to fix my session save path, and it still wont work...

Line 692 of php.ini - reads

Code:
session.save_path = c:\\abyss web server\\tmp


I have also tried

c:\abyss web server\tmp
c:/abyss web server/tmp

and none of them seem to of work. (and yes i restart server each time i update)

An example error I get is


Code:
Warning: open(/tmp\sess_ac32ac39f4711c12181b5872b60a1520, O_RDWR) failed: No such file or directory (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
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Dec 09, 2002 12:34 am    Post subject: Re: Session save path.... wont work? Reply with quote

Josh - Guest wrote:
Yeah, I tried to fix my session save path, and it still wont work...

Line 692 of php.ini - reads

Code:
session.save_path = c:\\abyss web server\\tmp


I have also tried

c:\abyss web server\tmp
c:/abyss web server/tmp

and none of them seem to of work. (and yes i restart server each time i update)

An example error I get is


Code:
Warning: open(/tmp\sess_ac32ac39f4711c12181b5872b60a1520, O_RDWR) failed: No such file or directory (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

This is a PHP problem and restarting the server doesn't help as Abyss Web Server has nothing to do with PHP internal variables.
You should check is the following points:
* A directory called c:\abyss web server\tmp exists. You should create it otherwise
* In php.ini file, the session.save_path looks like:
Code:
session.save_path = c:\abyss weline b server\tmp

Notice that you have not to double the backslashes in the .ini file.

That's it. It should work now (without even restarting the server, just invoke your script.)
Alternatively, you can set this path using the command session_save_path in your scripts:
Code:
session_save_path("c:\\abyss web server\\tmp");


More information is available in the PHP manual (search for session_save_path.)
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Josh - Guest
Guest





PostPosted: Mon Dec 09, 2002 12:45 am    Post subject: Nope Reply with quote

Still not right.... Just replaces the path not found agian...

Code:
Warning: open(/tmp\sess_5b0c81b01eae33a4c2319d4c9607045a, O_RDWR) failed: No such file or directory (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 (c:\Abyss Web Server\tmp) in Unknown on line 0



Heres my whole php.ini [Section "session"]

Code:
[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.
session.save_path = c:\abyss web server\tmp
; 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.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.
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

; trans sid support is disabled by default.
; Use of trans sid may risk your users security.
; Use this option with caution.
; - User may send URL contains active session ID
;   to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
;   in publically accessible computer.
; - User may access your site with the same session ID
;   always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Dec 09, 2002 1:10 am    Post subject: Re: Nope Reply with quote

Josh - Guest wrote:
Still not right.... Just replaces the path not found agian...

Code:
Warning: open(/tmp\sess_5b0c81b01eae33a4c2319d4c9607045a, O_RDWR) failed: No such file or directory (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 (c:\Abyss Web Server\tmp) in Unknown on line 0


The error message said "failed" to write data. If the directory is there, have you checked that it is writable? Is it read only or is its access restricted to some users? If so, change the write permissions.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Josh - Guest
Guest





PostPosted: Mon Dec 09, 2002 1:31 am    Post subject: No Reply with quote

Cant change it should already be like 777 or something...

Im on a local windows box, so that would have nothing todo with it
Back to top
Josh - Guest
Guest





PostPosted: Mon Dec 09, 2002 1:34 am    Post subject: no Reply with quote

Scratch that last repyl and change it too...

How would I go about doing this since im on a local windows box? It should be there already wouldnt it?
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Dec 09, 2002 1:47 am    Post subject: Re: no Reply with quote

Josh - Guest wrote:
Scratch that last repyl and change it too...

How would I go about doing this since im on a local windows box? It should be there already wouldnt it?

On Windows 2000/NT/XP, there are user permissions. Right click on the folder, choose properties, the Security, and set the users permissions.

On all Windows systems, Right click on the folder, choose properties, and uncheck the Read-only checkbox.

By the way, there is no chmod on Windows.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Guest






PostPosted: Mon Dec 09, 2002 1:59 am    Post subject: Reply with quote

So uncheck "Read only" ?
Back to top
Josh - Guest
Guest





PostPosted: Mon Dec 09, 2002 2:01 am    Post subject: no Reply with quote

Cause, there is no "security" tab on XP.

Theres a sharing tab is this what u mean?
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Dec 09, 2002 2:06 am    Post subject: Re: no Reply with quote

Josh - Guest wrote:
Cause, there is no "security" tab on XP.

Theres a sharing tab is this what u mean?

XP Pro has such a tab. If there is no "Security Tab", just uncheck the read-only checkbox.
These are no special instructions here, just usual instructions to allow a file/directory to be writable in Windows.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Josh - Gues
Guest





PostPosted: Tue Dec 10, 2002 9:04 pm    Post subject: damn.. Reply with quote

Either I did something wrong or its just not cooperating, When I unswitch the box, and hit apply,ok the settings go back to "read only"? Whats up with this? :P
Back to top
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Dec 11, 2002 12:06 am    Post subject: Re: damn.. Reply with quote

Josh - Gues wrote:
Either I did something wrong or its just not cooperating, When I unswitch the box, and hit apply,ok the settings go back to "read only"? Whats up with this? :P

Hmmm.... This is a Windows problem. Are you sure these files/directory aren't protected by some other mechanism? Try checking that. Otherwise, create another directory in another place and configure PHP to use that new one (some people recommend creating a subdirectory in your TEMP folder to store your session files.)
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group