Re: PHP 7.0.3 RC1 is available for testing - **** BC break ***
| From: | Yasuo Ohgaki | Date: | Mon, 25 Jan 2016 04:06:41 +0000 |
| Subject: | Re: PHP 7.0.3 RC1 is available for testing - **** BC break *** | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-90899@lists.php.net to get a copy of this message | ||
Hi Remi,
On Mon, Jan 25, 2016 at 11:47 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
>
> On Fri, Jan 22, 2016 at 7:38 PM, Remi Collet <remi@fedoraproject.org> wrote:
>>
>> It seems that using a user land SessionHandler, the "write" method is
>> not called, raising this issue.
>
> Thank you. I'll check it soon. (in a few days)
Thank you for the script.
I've tried and checked the output, but it seems OK to me.
It call open->read->write->close, twice.
--------------------------------------------------------
// Write
session_name('sessionname');
session_id('sessionid');
session_start(); // This should call open/read
$_SESSION['sessiondata'] = 'foo';
session_write_close(); // This should call write/close
echo '------------------'.PHP_EOL;
// Reopen
session_write_close();
// Copy & paste error? Does not need this line and should not
// call handlers while session is not active. Otherwise,
// something wrong could happen.
session_name('sessionname');
session_id('sessionid');
session_start(); // This should call open/read
var_dump($_SESSION);
// Shutdown should call write/close
--------------------------------------------------------
As I add comments in code, session_write_close() should not do
anything but the test script assumes write/close is called?
I've tested with Fedora 23's PHP 5.6.17 and got the expected result
--------------------------------------------------------
"MySessionHandler::__construct"
string(22) "MySessionHandler::open"
string(4) "/tmp"
string(11) "sessionname"
string(22) "MySessionHandler::read"
string(9) "sessionid"
string(23) "MySessionHandler::write"
string(9) "sessionid"
string(22) "sessiondata|s:3:"foo";"
string(23) "MySessionHandler::close"
------------------
string(22) "MySessionHandler::open"
string(4) "/tmp"
string(11) "sessionname"
string(22) "MySessionHandler::read"
string(9) "sessionid"
array(1) {
["sessiondata"]=>
string(3) "foo"
}
string(23) "MySessionHandler::write"
string(9) "sessionid"
string(22) "sessiondata|s:3:"foo";"
string(23) "MySessionHandler::close"
--------------------------------------------------------
Could you give more details or other test script?
Thank you!
--
Yasuo Ohgaki
yohgaki@ohgaki.net