我的php.ini[Session]
session.save_handler      = files   ; handler used to store/retrieve data
session.save_path         = c:/apache1.3.22/temp    ; session的目录
                                    ; in the case of files, this is the
                                    ; path where data files are stored
session.use_cookies       = 1       ; whether to use cookies

解决方案 »

  1.   

    TO:Mistruster(弱智d)
    你把session存在c:/apache1.3.22/temp中,能用吗?
    我的temp文件存在c:/php4/temp就要报错(如下配置),搞不懂了,其他同志说必须保存在c:/temp中,才有效。[Session]
    session.save_handler      = files   ; handler used to store/retrieve data
    session.save_path         = c:/php4/tmp    ; argument passed to save_handler
                                        ; in the case of files, this is the
                                        ; path where data files are stored
    session.use_cookies       = 1       ; whether to use cookies
    session.name              = PHPSESSID  
                                        ; name of the session
                                        ; is used as cookie name
    session.auto_start        = 0       ; initialize session on request startup
    session.cookie_lifetime   = 0       ; lifetime in seconds of cookie
                                        ; or if 0, until browser is restarted
    session.cookie_path       = /       ; the path the cookie is valid for
    session.cookie_domain     =         ; the domain the cookie is valid for
    session.serialize_handler = php     ; handler used to serialize data
                                        ; php is the standard serializer of PHP
    session.gc_probability    = 100       ; percentual probability that the 
                                        ; 'garbage collection' process is started
                                        ; on every session initialization
    session.gc_maxlifetime    = 0    ; after this number of seconds, stored
                                        ; data will be seen as 'garbage' and
                                        ; cleaned up by the gc process
    session.referer_check     =         ; check HTTP Referer to invalidate 
                                        ; externally stored URLs containing ids
    session.entropy_length    = 0       ; how many bytes to read from the file
    session.entropy_file      =         ; specified here to create the session id
    ; session.entropy_length    = 16
    ; session.entropy_file      = /dev/urandom
    session.cache_limiter     = nocache ; set to {nocache,private,public} to
                                        ; determine HTTP caching aspects
    session.cache_expire      = 180     ; document expires after n minutes
    session.use_trans_sid     = 1       ; use transient sid support if enabled
                                        ; by compiling with --enable-trans-sid
      

  2.   

    你把“/”变成“\”就可以了
    因为php默认的是unix下的目录,所以用的是“/”
    而windows下的是“\”
      

  3.   

    session.save_path                  =  c:/php4/tmp
    c:/php4/temp
    怎么看也不是一个目录 ^^帖主,警告什么?
    是不是什么"header already been sent" ?
    在php.ini中设
    output_buffering = 4096
      

  4.   

    把session.save_path =  c:/apache1.3.22/temp        ; 
    改为session.save_path = /
    就可以了,然后在c:建立一个tmp
    unix下在/建一个tmp就可以了
      

  5.   

    to All:session.save_path  =    c:/apache1.3.22/temp
    是能用的。我的是 Windows98 / Apache 1.3.22 / PHP 4.1.1 / MySQL 3.23.46
    //-----------------------------------------------------------------------------------------to anybody1(随便编一个):Windows下是可以用 / 的//-----------------------------------------------------------------------------------------to rosen(考试机器):
    我的PHP.INI以下两行和你不同:
    session.gc_probability    = 1       ; percentual probability that the 
                                        ; 'garbage collection' process is started
                                        ; on every session initialization
    session.gc_maxlifetime    = 1440    ; after this number of seconds, stored
                                        ; data will be seen as 'garbage' and
                                        ; cleaned up by the gc process
      

  6.   

    也许贴主只是语法错误就象
    http://www.csdn.net/expert/topic/519/519901.xml?temp=.764599
      

  7.   

    to:Mistruster(弱智d) session.gc_maxlifetime        = 0
    表示永远有效
    session.gc_probability        =  100              
    表示搜集的垃圾数据的百分比
      

  8.   

    [Session] 
    session.save_handler            =  files      ;  handler  used  to  store/retrieve  data 
    session.save_path                  =  c:/php4/tmp        ;  argument  passed  to  save_handler 
                                                                            ;  in  the  case  of  files,  this  is  the 
                                                                            ;  path  where  data  files  are  stored 
    session.use_cookies              =  1              ;  whether  to  use  cookies 
    session.name                            =  PHPSESSID    
                                                                            ;  name  of  the  session 
                                                                            ;  is  used  as  cookie  name 
    session.auto_start                =  0              ;  initialize  session  on  request  startup 
    session.cookie_lifetime      =  0              ;  lifetime  in  seconds  of  cookie 
                                                                            ;  or  if  0,  until  browser  is  restarted 
    session.cookie_path              =  /              ;  the  path  the  cookie  is  valid  for 
    session.cookie_domain          =                  ;  the  domain  the  cookie  is  valid  for 
    session.serialize_handler  =  php          ;  handler  used  to  serialize  data 
                                                                            ;  php  is  the  standard  serializer  of  PHP 
    session.gc_probability        =  100              ;  percentual  probability  that  the  
                                                                            ;  'garbage  collection'  process  is  started 
                                                                            ;  on  every  session  initialization 
    session.gc_maxlifetime        =  0        ;  after  this  number  of  seconds,  stored 
                                                                            ;  data  will  be  seen  as  'garbage'  and 
                                                                            ;  cleaned  up  by  the  gc  process 
    session.referer_check          =                  ;  check  HTTP  Referer  to  invalidate  
                                                                            ;  externally  stored  URLs  containing  ids 
    session.entropy_length        =  0              ;  how  many  bytes  to  read  from  the  file 
    session.entropy_file            =                  ;  specified  here  to  create  the  session  id 
    ;  session.entropy_length        =  16 
    ;  session.entropy_file            =  /dev/urandom 
    session.cache_limiter          =  nocache  ;  set  to  {nocache,private,public}  to 
                                                                            ;  determine  HTTP  caching  aspects 
    session.cache_expire            =  180          ;  document  expires  after  n  minutes 
    session.use_trans_sid          =  1              ;  use  transient  sid  support  if  enabled 
                                                                            ;  by  compiling  with  --enable-trans-sid