Doc #79609 [Opn->Fbk]: Warning in session_create_id Example #1

From: Date: Sun, 17 May 2020 21:59:22 +0000
Subject: Doc #79609 [Opn->Fbk]: Warning in session_create_id Example #1
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17593@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79609&edit=1 ID: 79609 Updated by: requinix@php.net Reported by: software_onbekend at hotmail dot com Summary: Warning in session_create_id Example #1 -Status: Open +Status: Feedback Type: Documentation Problem -Package: Documentation problem +Package: Session related PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Are you sure you're looking at https://www.php.net/manual/en/function.session-create-id.php? Because, > Warning: session_create_id(): Failed to create new ID in index.php on line 20. > Generating new session id is not allowed when the session is already started. The example is working for me. > Also at line 16, the if statement need an integer because the output of session_status is an > integer. It does that already. > Can the documentation for the "session-status" also be updated with the integer > return values? It does that too. > The example also uses "session_commit()", this is an alias of > "session_write_close", wouldn't it be > better to use "session_write_close" instead of "session_commit" ? The alias is not deprecated, but it probably would be better, yes. Previous Comments: ------------------------------------------------------------------------ [2020-05-17 20:46:35] software_onbekend at hotmail dot com Description: ------------ --- From manual page: https://php.net/function.session-create-id --- Warning: session_create_id(): Failed to create new ID in index.php on line 20. Generating new session id is not allowed when the session is already started. Also at line 16, the if statement need an integer because the output of session_status is an integer. https://www.php.net/manual/en/function.session-status.php Can the documentation for the "session-status" also be updated with the integer return values? The example also uses "session_commit()", this is an alias of "session_write_close", wouldn't it be better to use "session_write_close" instead of "session_commit" ? https://www.php.net/manual/en/function.session-commit.php Have a nice day ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79609&edit=1

« previous php.doc.bugs (#17593) next »