php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23059 Documentation wrong? Or just used the wrong word?
Submitted: 2003-04-05 04:45 UTC Modified: 2003-04-05 11:38 UTC
From: kyrael at web dot de Assigned:
Status: Closed Package: Session related
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kyrael at web dot de
New email:
PHP Version: OS:

 

 [2003-04-05 04:45 UTC] kyrael at web dot de
Taken from php.ini-dist:

; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_dividend,
; e.g. 1/100 means 1%.

session.gc_probability = 1
session.gc_dividend    = 100

Is this really true? Because, if it really was that way, gc_dividend should be named gc_divisor... dividend is the latin form for something to be divided.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-05 04:58 UTC] jmcastagnetto@php.net
That is a typo in the php4/php.ini-dist that comes from a typo in the code 
in php4/ext/session/session.c (introduced in revision 1.329) 
 
The 'diff -u' output for the fixes is below: 
 
$ diff -u php4/php.ini-dist-orig php4/php.ini-dist 
--- php4/php.ini-dist-orig      2003-04-05 02:51:07.000000000 -0800 
+++ php4/php.ini-dist   2003-04-05 02:56:01.000000000 -0800 
@@ -850,11 +850,11 @@ 
 
 ; Define the probability that the 'garbage collection' process is started 
 ; on every session initialization. 
-; The probability is calculated by using gc_probability/gc_dividend, 
+; The probability is calculated by using gc_probability/gc_divisor, 
 ; e.g. 1/100 means 1%. 
 
 session.gc_probability = 1 
-session.gc_dividend    = 100 
+session.gc_divisor    = 100 
 
 ; After this number of seconds, stored data will be seen as 'garbage' 
and 
 ; cleaned up by the garbage collection process. 
 
$ diff -u php4/ext/session/session.c-orig php4/ext/session/session.c 
--- php4/ext/session/session.c-orig     2003-04-05 02:57:33.000000000 
-0800 
+++ php4/ext/session/session.c  2003-04-05 02:58:04.000000000 -0800 
@@ -138,7 +138,7 @@ 
        PHP_INI_ENTRY("session.save_handler",           "files",     
PHP_INI_ALL, OnUpdateSaveHandler) 
        STD_PHP_INI_BOOLEAN("session.auto_start",       "0",         
PHP_INI_ALL, OnUpdateBool,   auto_start,         php_ps_globals,    
ps_globals) 
        STD_PHP_INI_ENTRY("session.gc_probability",     "1",         
PHP_INI_ALL, OnUpdateLong,    gc_probability,     php_ps_globals,    
ps_globals) 
-       STD_PHP_INI_ENTRY("session.gc_dividend",        "100",       
PHP_INI_ALL, OnUpdateLong,    gc_dividend,        php_ps_globals,    
ps_globals) 
+       STD_PHP_INI_ENTRY("session.gc_divisor",        "100",       
PHP_INI_ALL, OnUpdateLong,    gc_divisor,        php_ps_globals,    
ps_globals) 
        STD_PHP_INI_ENTRY("session.gc_maxlifetime",     "1440",      
PHP_INI_ALL, OnUpdateLong,    gc_maxlifetime,     php_ps_globals,    
ps_globals) 
        PHP_INI_ENTRY("session.serialize_handler",      "php",       
PHP_INI_ALL, OnUpdateSerializer) 
        STD_PHP_INI_ENTRY("session.cookie_lifetime",    "0",         
PHP_INI_ALL, OnUpdateLong,    cookie_lifetime,    php_ps_globals,    
ps_globals) 
@@ -1154,7 +1154,7 @@ 
        if (PS(mod_data) && PS(gc_probability) > 0) { 
                int nrdels = -1; 
 
-               nrand = (int) ((float) PS(gc_dividend) * 
php_combined_lcg(TSRMLS_C)); 
+               nrand = (int) ((float) PS(gc_divisor) * 
php_combined_lcg(TSRMLS_C)); 
                if (nrand < PS(gc_probability)) { 
                        PS(mod)->s_gc(&PS(mod_data), PS(gc_maxlifetime), 
&nrdels TSRMLS_CC); 
 #if 0 
 
 
 [2003-04-05 11:26 UTC] sniper@php.net
Nitpicking..

 [2003-04-05 11:38 UTC] sniper@php.net
And as some people don't bother closing bugs they 'fix'...
This is now "fixed" in CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 20:01:35 2024 UTC