Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sesstion problem

Status
Not open for further replies.

codefighta

Programmer
Joined
Nov 5, 2004
Messages
10
Location
US
Hi,

From time to time (no noticable pattern) I get this warning message on a page of my php app:
Code:
Notice: session_start(): ps_files_cleanup_dir: opendir(C:\WINDOWS\TEMP\) failed: Invalid argument (22) in c:\inetpub\[URL unfurl="true"]wwwroot\intranet\fccm\include\patUser.php[/URL] on line 465

The line of code this message is refering to looks like this:
Code:
461if( $this->useSessions )
462{
463  if( !defined( "SID" ) )
464  {
465  session_start();
466  }
     .
     .
     .
in my php.ini I have this:
Code:
session.save_path = "c:\windows\temp"
C:\WINDOWS\TEMP\ is a valid directory on the server and the sessions are really stored there (but they do not seem to be cleaned up)

Garbage collection settings in php.ini are as follows (defaults)
Code:
; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts
; on each request.

session.gc_probability = 1
session.gc_divisor     = 100

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440
Any ideas?
Thanks
cf
 
DaButcher, thanks for the hint!

The code I listed is 3rd party code and I am not 100% sure what is going on there, but would it make sense that the "SID" in
Code:
if( !defined( "SID" ) )
is checking whether there is a PHP session ID (SID) is defined or not? In my php.ini file I have this
Code:
; Name of the session (used as cookie name).
session.name = PHPSESSID
So I guess I have to change PHPSESSID to SID?

Thanks
cf
 
Hello DaButcher,

I have changed my php.ini file from

session.name = PHPSESSID
to
session.name = SID

(and restarted IIS) But the problem still occurs. Any other ideas?
thanks
cf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top