Session???????????
???????????? ???????[ 2015/10/13 14:18:49 ] ????????Session ????????
?????????:???????session id??cookie???
??????????????session?????????????????GC??????????????????????????????setcookie????????????????????????session_name()??Cookie?????????????????????????????????????η????????????????????????????μ?session_id??????????????????:
<?php
//@file session_destroy.php
session_start();
$sess_name = session_name();
$sess_id = session_id();
list(?? $path?? $domain?? ??) = session_get_cookie_params();
if ($sess_name && isset($_COOKIE[$sess_name])) {
setcookie($sess_name?? ''?? -1?? $path?? $domain);
if ($sess_id) {
session_destroy();
}
}
????????http?????????:
#
T 192.168.0.98:2638 -< 192.168.0.8:8080 [AP]
GET /session_destroy.php HTTP/1.1..Host: 192.168.0.8:8080..Connection: keep-alive..User-Agent: Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US) AppleWebKit/533.2 (KHTML?? like Gecko) Chrome/5.0.342.3 Safari/533.2..Accept: application/xml??appl
ication/xhtml+xml??text/html;q=0.9??text/plain;q=0.8??image/png??*/*;q=0.5..Accept-Encoding: gzip??deflate??sdch..Accept-Langu
age: zh-CN??zh;q=0.8..Accept-Charset: GBK??utf-8;q=0.7??*;q=0.3..Cookie: PHPSESSID=rjdtgvmueggplgqno66qlfket1....
##
T 192.168.0.8:8080 -< 192.168.0.98:2638 [AP]
HTTP/1.1 200 OK..Date: Tue?? 13 Apr 2010 07:08:24 GMT..Server: Apache/2.2.3 (CentOS)..X-Powered-By: PHP/5.1.6..Expires: T
hu?? 19 Nov 1981 08:52:00 GMT..Cache-Control: no-store?? no-cache?? must-revalidate?? post-check=0?? pre-check=0..Pragma: no-
cache..Set-Cookie: PHPSESSID=deleted; expires=Mon?? 13-Apr-2009 07:08:23 GMT..Content-Length: 222..Connection: close..Con
tent-Type: text/html; charset=UTF-8....
##
T 192.168.0.98:2642 -< 192.168.0.8:8080 [AP]
GET /p1.php HTTP/1.1..Host: 192.168.0.8:8080..Connection: keep-alive..User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.
1; en-US) AppleWebKit/533.2 (KHTML?? like Gecko) Chrome/5.0.342.3 Safari/533.2..Accept: application/xml??application/xhtml
+xml??text/html;q=0.9??text/plain;q=0.8??image/png??*/*;q=0.5..Accept-Encoding: gzip??deflate??sdch..Accept-Language: zh-CN??zh
;q=0.8..Accept-Charset: GBK??utf-8;q=0.7??*;q=0.3....
##
T 192.168.0.8:8080 -< 192.168.0.98:2642 [AP]
HTTP/1.1 200 OK..Date: Tue?? 13 Apr 2010 07:09:15 GMT..Server: Apache/2.2.3 (CentOS)..X-Powered-By: PHP/5.1.6..Set-Cookie
: PHPSESSID=lbmk3sc5a88e9cjuekr0aa9pc3; path=/..Expires: Thu?? 19 Nov 1981 08:52:00 GMT..Cache-Control: no-store?? no-cach
e?? must-revalidate?? post-check=0?? pre-check=0..Pragma: no-cache..Content-Length: 11..Connection: close..Content-Type: te
xt/html; charset=UTF-8....hello world
?????????????????????????/session_destroy.php????????????session_id??Cookie????????????????????/p1.php?????http???????????Cookie???????session id??????????(????????????)?????????????/p1.php??http?????????????????????????????·?????????μ?session id??????????????ù????session?????
??????session????????php.ini????:
????1?? session.gc_probability??session.gc_divisor
?????????????????????????GC???????????1/1000??????????????????????????λ????GC????session?????GC???????????????????????????????????????????μ??session.save_path????????????????????????php?????Ч???
????2?? session.gc_maxlifetime = 1440
????????session????????λ???????GC????? ?????stat???session?????????unix????????????????????????????????session.gc_maxlifetime???????????????
???????
????1?? PHP???Cookie?????????session id????????????GET????????session id?????????????????
????2?? ???????setcookie()???????????????session id??Cookie????????
????3?? PHP GC??????session??????????????????????????????????????????????????1/1000????????????????????????????????????СPHP GC?????????PHP GC????session????php?????Ч???
????4?? ?????????????session????
????<?php
????session_start();
????if (isset($_SESSION['SESS_TIMEOUT'])) {
????if ($_SERVER['REQUEST_TIME'] > $_SESSION['SESS_TIMEOUT']) {
????setcookie(session_name()?? session_id()?? -1?? '/');
????session_unset();
????session_destroy();
????}
????} else {
????$_SESSION['SESS_TIMEOUT'] = $_SERVER['REQUEST_TIME'] + 3600;
????}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???д?ò??????????????????????д?淶??α??????????????????????????????????????????????????????е?Ч?????в????г??????????????????????в?????????????в????г????????????????????????????в????е???????????????????????????????????????ж??????????????????????????????ALM(??????????????)????????????????excel????????ALM(??????????????)????????????????????????????????????????????????д????????????????????????????????????????????????????????????????????????

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????