Bug #68015 [Opn->Fbk]: Session is not filled in cli script

From: Date: Tue, 03 Feb 2015 03:43:34 +0000
Subject: Bug #68015 [Opn->Fbk]: Session is not filled in cli script
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190420@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68015&edit=1

 ID:                 68015
 Updated by:         yohgaki@php.net
 Reported by:        rmoisto at gmail dot com
 Summary:            Session is not filled in cli script
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Session related
 Operating System:   Ubuntu 12 x64
 PHP Version:        5.5.16
-Assigned To:        
+Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

It seems working now. Do you still have this issue?

[yohgaki@dev PHP-5.5]$ cat t1.php
<?php
session_id($argv[1]);
session_start();
var_dump($_SESSION);
$_SESSION['test']=time();
[yohgaki@dev PHP-5.5]$ ./php-bin -d session.use_strice_mode=0 t1.php 21345
array(1) {
  ["test"]=>
  int(1422934949)
}
[yohgaki@dev PHP-5.5]$ ./php-bin -d session.use_strice_mode=0 t1.php 21345
array(1) {
  ["test"]=>
  int(1422934964)
}


Previous Comments:
------------------------------------------------------------------------
[2014-09-12 20:44:07] rmoisto at gmail dot com

Description:
------------
I have a tiny cli script that accepts a session id as a command line argument. It's job is to
fetch that session and print it out.

Since upgrading to PHP 5.5.16 the $_SESSION variable is always empty. It did work before.

Test script:
---------------
<?php
session_id($argv[1]);
session_start();
var_dump($_SESSION);

Expected result:
----------------
$_SESSION is an array filled with session information.

Actual result:
--------------
$_SESSION is an empty array.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68015&edit=1


Thread (11 messages)

« previous php.bugs (#190420) next »