You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING RECEIVED
PHP Warning: session_start(): Cannot start session when headers already sent in /filepath on line xx
CURRENT SCENARIO & ISSUE
This warning gives the line number xx of the session_start(). It does not tell you WHAT triggered the sending of headers before this point was reached, and where that point is.
REQUESTED IMPROVEMENT
Add the file / line number for WHEN the last headers were previously sent - as this can be very difficult to pinpoint.
The text was updated successfully, but these errors were encountered:
Duplicated session starts can be annoying to debug. The error that
occurs when a session is already active doesn't tell you where it
was initialized, so figuring out the callsite involves manual
debugging to find it out.
This keeps track of the call site of session_start as a request
global, and frees at the end of the request. It should make it
easier to find these instances for PHP users.
The resulting message can look like:
Notice: session_start(): Ignoring session_start() because a session is already active (started from /home/calvin/src/php-src/inc.php on line 4) in /home/calvin/src/php-src/index.php on line 9
FixesphpGH-10721
* Note where a session was already started
Duplicated session starts can be annoying to debug. The error that
occurs when a session is already active doesn't tell you where it
was initialized, so figuring out the callsite involves manual
debugging to find it out.
This keeps track of the call site of session_start as a request
global, and frees at the end of the request. It should make it
easier to find these instances for PHP users.
The resulting message can look like:
Notice: session_start(): Ignoring session_start() because a session is already active (started from /home/calvin/src/php-src/inc.php on line 4) in /home/calvin/src/php-src/index.php on line 9
FixesGH-10721
* Convert to using zend_string for session start location
* Fix leak with session start callsite filename
If this was already initialized, we'd forget it. Have shared free
between session_start and RSHUTDOWN.
* For sessions that are automatically started, note that
Easy to forget that you have this set, in which case, session start
is done at RINIT outside of user code. Because this config option
can't change at runtime, we can check for it and make the error
more specific if that's the case.
WARNING RECEIVED
PHP Warning: session_start(): Cannot start session when headers already sent in /filepath on line xx
CURRENT SCENARIO & ISSUE
This warning gives the line number xx of the session_start(). It does not tell you WHAT triggered the sending of headers before this point was reached, and where that point is.
REQUESTED IMPROVEMENT
Add the file / line number for WHEN the last headers were previously sent - as this can be very difficult to pinpoint.
The text was updated successfully, but these errors were encountered: