Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide more information if writing session with custom save handler fails #7787

Closed
@mokraemer

Description

@mokraemer

Description

The following code:

<?phpclass MySessionHandlerimplements SessionHandlerInterface, SessionUpdateTimestampHandlerInterface {publicfunctionwrite($sessID,$sessData,$lock =false):bool {if(...){returnfalse;        }if(...){returnfalse;        }returntrue;    }publicfunctionupdateTimestamp($sessID,$val){returnfalse;    }}$handler =newMySessionHandler();session_set_save_handler($handler,true);session_start();

Resulted in this output:

session_write_close(): Failed to write session data using user defined save handler. (session.save_path: /var/lib/php)

But I expected this output instead:
Having this "fake" session handler, it is impossible to say where session write failed and find the cause. An installed error handler just reports
errorHandler::errorHandler called at [:]

PHP Version

php 8.0.14

Operating System

Mageia 8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp