[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Sessions / cookies not working?



El Mié 08 Jun 2005 16:31, Kurt Budiarto escribió:
> My organization just upgraded to a more powerful web server for our CMS 
> site. We had to set up the server from scratch, installing PHP Version 
> 4.3.11 and all the nuts and bolts for the server.
> 
> Our web site runs fine, but I notice now the php sessions are not showing up 
> at all in the URLs.
> 
> The session files are there in the /tmp folder, but for some reason they are 
> not using the session filenames I specified in the CMS config file nor in 
> the php.ini.
> 
> Here is my session configs in php.ini:
> 
> Session Support  enabled
> Registered save handlers  files user
> Directive Local Value Master Value
> session.auto_start Off Off
> session.bug_compat_42 Off Off
> session.bug_compat_warn On On
> session.cache_expire 180 180
> session.cache_limiter nocache nocache
> session.cookie_domain no value no value
> session.cookie_lifetime 0 0
> session.cookie_path / /
> session.cookie_secure Off Off
> session.entropy_file no value no value
> session.entropy_length 0 0
> session.gc_divisor 1000 1000
> session.gc_maxlifetime 1440 1440
> session.gc_probability 1 1
> session.name PHPSESSID PHPSESSID
> session.referer_check no value no value
> session.save_handler files files
> session.save_path /tmp /tmp
> session.serialize_handler php php
> session.use_cookies On On
> session.use_only_cookies Off Off
> session.use_trans_sid Off Off

Why do you repeat all the values?

Here's mine (sessions are saved in files in /tmp/):

[root www root]# grep -i session /etc/php.ini
[Session]
session.save_handler = files
; variable in order to use PHP's session functions.
;     session.save_path = "N;/path"
; where N is an integer.  Instead of storing all the session files in
; store the session data in those directories.  This is useful if you
; a more efficient layout for servers that handle lots of sessions.
;         You can use the script in the ext/session dir for that purpose.
;         use subdirectories for session storage
session.save_path = /tmp
session.use_cookies = 1
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1
; Name of the session (used as cookie name).
session.name = PHPSESSID
; Initialize session on request startup.
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
; on every session initialization.
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
; NOTE: If you are using the subdirectory option for storing session files
;       (see session.save_path above), then garbage collection does *not*
;       setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
;          cd /path/to/sessions; find -cmin +24 | xargs rm
; to initialize a session variable in the global scope, albeit 
register_globals
session.bug_compat_42 = Off
session.bug_compat_warn = Off
; HTTP_REFERER has to contain this substring for the session to be
session.referer_check =
session.entropy_length = 0
; Specified here to create the session id.
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
; - User may send URL contains active session ID
; - URL that contains active session ID may be stored
; - User may access your site with the same session ID
session.use_trans_sid = 0


-- 
 16:37:38 up 2 days,  4:28,  3 users,  load average: 1.69, 1.04, 0.76
-----------------------------------------------------------------
Martín Marqués        | select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
             Universidad Nacional
                  del Litoral
-----------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]