Asked by:
Wincache session handler crash

Question
-
User962350831 posted
On latest Wincache 1.3.7.6, tested on PHP 5.5.26.
In php.ini use:
session.save_handler = wincache
Now set session storage path to unexistent location:
session.save_path = "D:\caca\"
Script 1
<?php session_start(); print "<html><body>WORKS</body></html>";
PHP FATALS with the following message (expected):
Fatal error: session_start(): Failed to initialize storage module: wincache (path: D:\caca\)
Script 2
<?php class WincacheSessionHandler extends SessionHandler { public function read($session_id) { $data = parent::read($session_id); } } // Initialize the storage $handler = new WincacheSessionHandler(); session_set_save_handler($handler, true); session_start(); print "<html><body>WORKS</body></html>";
You get a WSOD crash (not a PHP fatal):
Faulting application name: php-cgi.exe, version: 5.5.26.0, time stamp: 0x5578a6fc
Faulting module name: php_wincache.dll, version: 1.3.7.6, time stamp: 0x556cd721
Exception code: 0xc0000005
Fault offset: 0x000163bf
Faulting process id: 0x588
Faulting application start time: 0x01d0ad4649943c17
Faulting application path: C:\Program Files (x86)\PHP\php5.5\php-cgi.exe
Faulting module path: C:\Program Files (x86)\PHP\php5.5\ext\php_wincache.dll
Report Id: 88887401-1939-11e5-83b0-8019346bbdc6
Faulting package full name:
Faulting package-relative application ID:Not a big deal, but makes a nightmare to troubleshoot a broken session storage path :(
Monday, June 22, 2015 7:59 PM
All replies
-
User409000176 posted
Thank you for the bug report! I'll investigate as time permits.
If you haven't already, please feel free to file a bug in the bugs.php.net DB.
Thx!
--E.
Tuesday, June 23, 2015 2:19 PM -
User1924036252 posted
Have you made sure the path exists and that IIS_USER has write permissions for it? Did you delete any old session files before re-starting IIS?
We have been using the Wincache session handler for years now (currently on 1.3.7.4 with PHP 5.6.10) and have zero problems.
Monday, June 29, 2015 4:07 PM -
User409000176 posted
FYI--
Fix for the invalid session.save_path issue has been uploaded to sourceforge. WinCache 1.3.7.7.
php 5.4 x86 nts: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.7-dev-5.4-nts-vc9-x86.exe/download
php 5.5 x86 nts: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.7-dev-5.5-nts-vc11-x86.exe/download
php 5.6 x86 nts: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.7-dev-5.6-nts-vc11-x86.exe/download
Hope this helps!
--E.
Tuesday, August 4, 2015 4:03 PM -
User962350831 posted
Great news.
It is good to see the project getting fixes indication of healthy support.
And this will probably save someone sooner or later a tough time trying to diagnose a broken session path handler.
Thanks!
Monday, August 10, 2015 5:57 AM