|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-04-29 22:32 UTC] spam2 at rhsoft dot net
Description: ------------ [30-Apr-2017 00:16:55 Europe/Vienna] PHP Warning: session_name(): Cannot change session name when headers already sent in /Volumes/dune/www-servers/cms/cms/autotests/suite/backend.php on line 40 for *sure* not line 40 is "$session_name = session_name();" nobody is asking here for any change PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
just run a CLI script with no session started - the line from te origin report is one of many thousands and it's intention is to work environment independet and get/send the correct cookie for thousands of curl calls i will rewrite the code now to "ini_get('session.name'); but that don't change the fact that there is some BC changeIt seems current master's session_name() is changed to send cookie even when it shouldn't. [yohgaki@dev PHP-master]$ ./sapi/cli/php -r 'var_dump($n=session_name("foo"));var_dump(session_name());' string(9) "PHPSESSID" Warning: session_name(): Cannot change session name when headers already sent in Command line code on line 1 bool(false) [yohgaki@dev PHP-master]$ php -v PHP 7.0.20 (cli) (built: Jun 7 2017 04:59:25) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.20, Copyright (c) 1999-2017, by Zend Technologies [yohgaki@dev PHP-master]$ php -r 'var_dump($n=session_name("foo"));var_dump(session_name());' string(9) "PHPSESSID" string(3) "foo"