locked
Wincache session handler crash RRS feed

  • 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