Detailed setup parameters for the session in the PHP5 configuration file _php Tips

Source: Internet
Author: User
; Processing session access Mode (preset: Files)
Session.save_handler = Files

; Session file storage path (preset:/tmp)
Session.save_path =/tmp

; Session use cookie function (preset: start 1)
Session.use_cookies = 1

; The name of the session (preset: PHPSESSID)
Session.name = Phpsessid

; auto Start (preset: Off 0, here you can change to 1)
Session.auto_start = 0

The session uses the lifetime of the cookie in seconds (preset: Disappears with browser shutdown 0)
Session.cookie_lifetime = 0

The path of the session using the cookie (preset: Same as Domian or root path/)
Session.cookie_path =/

The domain name of the session using cookies (preset: empty)
Session.cookie_domain =

, the way of processing continuous data, this function only WDDX module or PHP internal use (Preset: PHP)
Session.serialize_handler = PHP

; garbage collection at a rate of 1 per thousand
, garbage collection Processing probability (preset: 1)
session.gc_probability = 1
; Set process ratios (php5 new parameters, presets: 1000)
Session.gc_divisor = 1000

(garbage Collection) The Lifetime (preset: 1440[seconds]) before being processed
Session.gc_maxlifetime = 1440

; PHP 4.2 and previous versions have a bug, even if you disable "Allow registration of global variables". Still allows you to initialize the value of a session in a global variable scope
; PHP 4.3 and later versions will issue a corresponding warning, you can suppress the warning. In PHP5, only if you open bug_compat_42 (=on), the warning will be displayed.
session.bug_compat_42,0
Session.bug_compat_warn = 1

Session checks whether the session still exists (preset: empty) when you rearrange it
Session.referer_check =

; Specify the length of the session value (preset: OFF)
Session.entropy_length = 0

; A file that specifically sets the session value
Session.entropy_file =

; Use cache limiter (preset: do not cache)
Session.cache_limiter = NoCache

; Use the cache lifetime
Session.cache_expire = 180

; Use SID value (SESSION_ID) transfer mode (based on security, presets: OFF)
Session.use_trans_sid = 0

Select a hash function, 0 is MD5 (128 bit intensity), 1 is SHA-1 (160 bit intensity)
session.hash_function = 0

Defines how many bits each character stores when converting the 2 feed hash data to some readable data.
; 4 bits: 0-9, a-f
; 5 bits: 0-9, a-v
6 bits: 0-9, A-Z, a-Z, "-", ","
Session.hash_bits_per_character = 5

; URL redirect Label
Url_rewriter.tags = "A=href,area=href,frame=src,input=src,form=fakeentry"

Remember to reboot the Apache server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.