|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79229 CLI would greatly benefit from full session support
Submitted: 2020-02-05 10:48 UTC Modified: -
From: fidhleir99 at gmail dot com Assigned:
Status: Open Package: Session related
PHP Version: 7.4.2 OS: FreeBSD 11.3R
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: fidhleir99 at gmail dot com
New email:
PHP Version: OS:


 [2020-02-05 10:48 UTC] fidhleir99 at gmail dot com
I do quite a lot with php from the command line --I strongly prefer it over the unix shell languages, it's much quicker to use for utility development than C, and much more stable for big jobs than running them in a browser.

It didn't occur to me that the CLI might not have full session support since it's such a natural for preserving state.  So I spent a frustrating day yesterday trying to debug the problem I was having getting my test session to resume.  It wasn't until I was falling asleep last night that the penny dropped:  maybe the CLI doesn't *have* proper session support??

Yep.  That's what it was, of course.

Now that I know what's going on, I can work around it.  But it would be *very* nice to be able to use the same code in both environments.  Yesterday's problems seemed to be centered on the CLI's inability to store and retrieve the session cookie.  But that ought to be a really easy fix:  store cookies in the same subtree used for php.ini, which in the case of freebsd is /usr/local/etc. 

I know everyone is always busy, but if you did a survey I think you'd find that quite a few people would benefit from the CLI having full session support.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 06:05:52 2022 UTC