Php session when you run the script from the console?

Use session.
Start the first script from the console, write in the session while the script is running all the decorum and fine.

When you rerun the same script and appeal to the same session(session_name(blah)), it cannot receive them.
It creates a new session according to the folder tmp to store sessions...
after the change some missed...

z.s: the lifetime of the session pointed out forcibly in the header of the script.
php5.3
July 8th 19 at 15:35
1 answer
July 8th 19 at 15:37
Solution
Before the start of the session, specify the ID:
session_id('cli');
Thank you for help.
confused sesim and seside.
two day thought not. - nikita.Stracke commented on July 8th 19 at 15:40
: Documentation session_name Write:
name
The session name references the name of the session, which is used in cookies and URLs (e.g. PHPSESSID).
- Violet_Wiso commented on July 8th 19 at 15:43

Find more questions by tags PHP