ses

When a PHP site remembers a cart, language choice or sign-in between page requests, the server may keep those values in a PHP session. ses lets you inspect and edit the session visible to this terminal. It is not the same thing as a browser cookie: the browser usually carries only a session identifier, while the associated data stays on the server.

DiagnosticsVersion 1.3.6Stable
lil-terminal

Overview

When a PHP site remembers a cart, language choice or sign-in between page requests, the server may keep those values in a PHP session. ses lets you inspect and edit the session visible to this terminal. It is not the same thing as a browser cookie: the browser usually carries only a session identifier, while the associated data stays on the server.

How to use this safely

Run ses -l first to see top-level keys and their value types. Inspect a single field with ses profile.name rather than printing the entire session. Use ses profile.name : Ada for text or ses profile.active -j : true for a typed JSON value. Dotted paths follow nested arrays; escape a dot that belongs inside a key. Export only the safe part of a session to a JSON file if you need to inspect or reproduce a configuration. Import with -r only when replacing existing values is intentional. An export creates a file in the hosting account; review access permissions and remove it when no longer needed. The module masks some names associated with passwords or tokens and protects designated session keys. That is a name-based safeguard, not an exhaustive secret detector: inspect any output before sharing. ses -r resets selected lil-terminal working values while preserving authorization; ses -R destroys the whole PHP session and reloads the terminal. Neither clears every browser cookie. Do not use resets casually on a live site.

Syntax

lil-terminal
ses [path] [options] [: value]

Reference

ses

show the session as a masked PHP array

ses -l

list top-level keys and types

ses <path>

show a key or escaped dotted path with its hierarchy preserved

ses <path> : <value>

store text

ses <path> -j : <json>

store a JSON value

ses <path> -d

delete a key or branch and show the updated session

ses export [path] [-o <file>]

export safe session data to JSON; default session.json

ses import <file> [path] [-r]

import JSON into the session; -r replaces existing data

ses -r

reset lil-terminal working data but keep authorization

ses -R

destroy the complete session and reload the terminal

Practical use and safety

Run ses -l first to see top-level keys and their value types. Inspect a single field with ses profile.name rather than printing the entire session. Use ses profile.name : Ada for text or ses profile.active -j : true for a typed JSON value. Dotted paths follow nested arrays; escape a dot that belongs inside a key.

Export only the safe part of a session to a JSON file if you need to inspect or reproduce a configuration. Import with -r only when replacing existing values is intentional. An export creates a file in the hosting account; review access permissions and remove it when no longer needed.

The module masks some names associated with passwords or tokens and protects designated session keys. That is a name-based safeguard, not an exhaustive secret detector: inspect any output before sharing. ses -r resets selected lil-terminal working values while preserving authorization; ses -R destroys the whole PHP session and reloads the terminal. Neither clears every browser cookie. Do not use resets casually on a live site.

In Minimum, only ses, ses <path> and ses -l work. Editing, JSON import/export and reset require Base.

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Store structured session data and read it back

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install ses
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install ses -m
Exact public version

Install exactly this published version.

install ses -v 1.3.6
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade ses
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install ses -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Store structured session data and read it back
ses
Array
(
    [c] => /sandbox
    [b] => /sandbox
    [profile] => Array
        (
            [name] => Ada
            [active] => 
            [roles] => Array
                (
                    [0] => viewer
                )

        )

    [auth] => [hidden]
    [auth_prompt] => [hidden]
    [account_token] => [hidden]
    [key] => Array
        (
            [theme] => sunny
        )

)
List top-level keys and types
ses -l
account_token  string
auth           string
auth_prompt    array
b              string
c              string
key            object
profile        object
Show a key or escaped dotted path with its hierarchy preserved
ses profile.name
Ada
Store text
ses profile.name : Ada
+
Show a key or escaped dotted path with its hierarchy preserved
ses profile.name
Ada
Store a JSON value
ses profile.active -j : true
+
Protect authorization state
ses profile.active
false
Store a JSON value
ses profile.roles -j : ["editor","viewer"]
+
Show a key or escaped dotted path with its hierarchy preserved
ses profile.roles
Array
(
    [0] => viewer
)
Delete a key or branch and show the updated session
ses profile.name -d
Array
(
    [c] => /sandbox
    [b] => /sandbox
    [profile] => Array
        (
            [active] => 
            [roles] => Array
                (
                    [0] => viewer
                )

        )

    [auth] => [hidden]
    [auth_prompt] => [hidden]
    [account_token] => [hidden]
    [key] => Array
        (
            [theme] => sunny
        )

)
Show a key or escaped dotted path with its hierarchy preserved
ses profile.unknown
Session path not found
Show a key or escaped dotted path with its hierarchy preserved
ses auth
[hidden]
Store text
ses auth : open
Protected session key
Store a JSON value
ses profile.active -j : {invalid}
Invalid JSON: Syntax error
Export safe session data to JSON; default session.json
ses export profile -o sandbox/session-profile.json
File   session-profile.json
Bytes  82
Export safe session data to JSON; default session.json
ses export auth -o sandbox/auth.json
Protected session key
Import JSON into the session; -r replaces existing data
ses import sandbox/session-safe.json profile -r
Array
(
    [c] => /sandbox
    [b] => /sandbox
    [profile] => Array
        (
            [name] => Bea
            [active] => 
        )

    [auth] => [hidden]
    [auth_prompt] => [hidden]
    [account_token] => [hidden]
    [key] => Array
        (
            [theme] => sunny
        )

)
Import JSON into the session; -r replaces existing data
ses import sandbox/session-safe.json profile
Session path exists; use -r
Reset lil-terminal working data but keep authorization
ses -r
+
Destroy the complete session and reload the terminal
ses -R
The PHP session is destroyed and the terminal reloads.
List top-level keys and types
ses -l -j
?

Related documentation

Current public release

v1.3.62026-11-01

Production refinement

Current stable release of ses. When a PHP site remembers a cart, language choice or sign-in between page requests, the server may keep those values in a PHP session.