Detailed Setup parameter description of session in PHP5 configuration file _php Tutorial

Source: Internet
Author: User
Tags variable scope
Session access Mode (presets: 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 can be changed to 1)
Session.auto_start = 0

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

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

Session using the domain name of the cookie (default: null)
Session.cookie_domain =

, the method 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
The chance of garbage collection processing (preset: 1)
session.gc_probability = 1
; Set process ratio, (php5 new parameter, preset: 1000)
Session.gc_divisor = 1000

, (garbage collection) the lifetime before being processed (preset: 1440[seconds])
Session.gc_maxlifetime = 1440

; PHP 4.2 and previous versions have a bug, even if you disable the "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 releases will warn you, you can suppress the warning. PHP5, only if you open bug_compat_42 (=on), the warning will be displayed.
session.bug_compat_42,0
Session.bug_compat_warn = 1

The session checks to see if the session is still present (default: null) when re-organizing
Session.referer_check =

Special set the length of Session value (preset: OFF)
Session.entropy_length = 0

Special set session value of the file
Session.entropy_file =

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

; using the cache lifetime
Session.cache_expire = 180

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

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

Define how many bits per character are stored when converting 2 binary hash data to some readable data.
; 4 bit: 0-9, a-f
; 5 bit: 0-9, a-v
; 6 bits: 0-9, A-Z, a-Z, "-", ","
Session.hash_bits_per_character = 5

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

Remember to restart the Apache server.

http://www.bkjia.com/PHPjc/323120.html www.bkjia.com true http://www.bkjia.com/PHPjc/323120.html techarticle the session access mode (presets: files) Session.save_handler = files; session file storage path (preset:/tmp) Session.save_path =/tmp; Session using the function of cookies (pre ...

  • Related Article

    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.