PHP 5.4.5 发布
PHP 5.4.5和5.3.15发布。2012-07-19 上个版本是2012-06-15的5.4.4/5.3.14修正了30多个Bug以及几个安全漏洞。经过1个RC.
This release fixes over 30 bugs and includes a fix for a security related overflow issue in the stream implementation.
下载:http://www.php.net/get/php-5.4.5.tar.bz2/from/cn.php.net/mirror
完全改进:
Version 5.4.5
19-July-2012
Core
Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
Fixed bug #62432 (ReflectionMethod random corrupt memory on high concurrent)
Fixed bug #62373 (serialize() generates wrong reference to the object).
Fixed bug #62357 (compile failure: (S) Arguments missing for built-in function __memcmp)
Fixed bug #61998 (Using traits with method aliases appears to result in crash during execution)
Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
Fixed potential overflow in _php_stream_scandir (CVE-2012-2688)
EXIF
Fixed information leak in ext exi
FPM
Fixed bug #62205 (php-fpm segfaults (null passed to strstr)
Fixed bug #62160 (Add process.priority to set nice(2) priorities)
Fixed bug #62153 (when using unix sockets, multiples FPM instances)
Fixed bug #62033 (php-fpm exits with status 0 on some failures to start)
Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm)
Fixed bug #61835 (php-fpm is not allowed to run as root)
Fixed bug #61295 (php-fpm should not fail with commented 'user'
Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests)
Fixed bug #61045 (fpm don't send error log to fastcgi clients). (fat) for non-root start)
Fixed bug #61026 (FPM pools can listen on the same address). (fat) can be launched without errors)
Iconv
Fixed bug #55042 (Erealloc in iconv.c unsafe)
Intl
Fixed bug #62083 (grapheme_extract() memory leaks)
Fixed bug #62081 (IntlDateFormatter constructor leaks memory when called twice)
Fixed bug #62070 (Collator::getSortKey() returns garbage)
Fixed bug #62017 (datefmt_create with incorrectly encoded timezone leaks pattern)
Fixed bug #60785 (memory leak in IntlDateFormatter constructor)
ResourceBundle constructor now accepts NULL for the first two arguments
JSON
Fixed bug #61359 (json_encode() calls too many reallocs)
libxml
Fixed bug #62266 (Custom extension segfaults during xmlParseFile with FPM SAPI)
Phar
Fixed bug #62227 (Invalid phar stream path causes crash)
Readline
Fixed bug #62186 (readline fails to compile - void function should not return a value)
Reflection
Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfault)
Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
Sockets
Fixed bug #62025 (__ss_family was changed on AIX 5.3)
SPL
Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to dot files)
Fixed bug #62262 (RecursiveArrayIterator does not implement Countable)
XML Writer
Fixed bug #62064 (memory leak in the XML Writer module)
Zip
Upgraded libzip to 0.10.
Version 5.3.15
19-July-2012
Zend Engine
Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
COM
Fixed bug #62146 com_dotnet cannot be built shared
Core
Fixed potential overflow in _php_stream_scandir, CVE-2012-2688
Fixed bug #62432 (ReflectionMethod random corrupt memory on high concurrent)

要保護應用免受與會話相關的XSS攻擊,需採取以下措施:1.設置HttpOnly和Secure標誌保護會話cookie。 2.對所有用戶輸入進行輸出編碼。 3.實施內容安全策略(CSP)限制腳本來源。通過這些策略,可以有效防護會話相關的XSS攻擊,確保用戶數據安全。

优化PHP会话性能的方法包括:1.延迟会话启动,2.使用数据库存储会话,3.压缩会话数据,4.管理会话生命周期,5.实现会话共享。这些策略能显著提升应用在高并发环境下的效率。

theSession.gc_maxlifetimesettinginphpdeterminesthelifespanofsessiondata,setInSeconds.1)它'sconfiguredinphp.iniorviaini_set().2)abalanceisesneededeededeedeedeededto toavoidperformance andunununununexpectedLogOgouts.3)

在PHP中,可以使用session_name()函數配置會話名稱。具體步驟如下:1.使用session_name()函數設置會話名稱,例如session_name("my_session")。 2.在設置會話名稱後,調用session_start()啟動會話。配置會話名稱可以避免多應用間的會話數據衝突,並增強安全性,但需注意會話名稱的唯一性、安全性、長度和設置時機。

會話ID應在登錄時、敏感操作前和每30分鐘定期重新生成。 1.登錄時重新生成會話ID可防會話固定攻擊。 2.敏感操作前重新生成提高安全性。 3.定期重新生成降低長期利用風險,但需權衡用戶體驗。

在PHP中設置會話cookie參數可以通過session_set_cookie_params()函數實現。 1)使用該函數設置參數,如過期時間、路徑、域名、安全標誌等;2)調用session_start()使參數生效;3)根據需求動態調整參數,如用戶登錄狀態;4)注意設置secure和httponly標誌以提升安全性。

在PHP中使用會話的主要目的是維護用戶在不同頁面之間的狀態。 1)會話通過session_start()函數啟動,創建唯一會話ID並存儲在用戶cookie中。 2)會話數據保存在服務器上,允許在不同請求間傳遞數據,如登錄狀態和購物車內容。

如何在子域名間共享會話?通過設置通用域名的會話cookie實現。 1.在服務器端設置會話cookie的域為.example.com。 2.選擇合適的會話存儲方式,如內存、數據庫或分佈式緩存。 3.通過cookie傳遞會話ID,服務器根據ID檢索和更新會話數據。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

SublimeText3漢化版
中文版,非常好用

Dreamweaver CS6
視覺化網頁開發工具

Safe Exam Browser
Safe Exam Browser是一個安全的瀏覽器環境,安全地進行線上考試。該軟體將任何電腦變成一個安全的工作站。它控制對任何實用工具的訪問,並防止學生使用未經授權的資源。

MantisBT
Mantis是一個易於部署的基於Web的缺陷追蹤工具,用於幫助產品缺陷追蹤。它需要PHP、MySQL和一個Web伺服器。請查看我們的演示和託管服務。

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!