php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #3461 Session Support
Submitted: 2000-02-11 21:49 UTC Modified: 2000-02-16 18:23 UTC
From: johnston at megaepic dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Beta 3 OS: Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: johnston at megaepic dot com
New email:
PHP Version: OS:

 

 [2000-02-11 21:49 UTC] johnston at megaepic dot com
The current session support of PHP4 is pretty bad. I dont mean to be insulting or anything, but the session functions like session_start() and session_register() are too high level. 

It would make more sense to do it this way:
session_start() start a session. thats it. no setting of variables - just init a new session id, and start passing it between pages with cookies or get variables.

session_pickup(variablename,[session id]) set the local variable(s) and make it so that if any of those variables get changed, the changes get made to the session (if i pickup where i left off, and i change some of those variables, I want my next page to know about it). If no var name is specified, maybe pickup all of them

session_register(variable name, [session id]) register a session variable.  This makes it so that the variable gets lugged around with the session and if changes get made to the variable on another page, the new value is propigated.

session_variables(session id) - similar to array_keys() returns all of the variables held in the session

session_end($session id) ends the session, unregisters everything

session_unregister(variable, [session id])  stop propigating a particular variable

session_lock(variable, [session id]) make it so that a variable in the session is read only - still gets propigated, but cant be changed

session_unlock(variable, [session id]) unlock the variable, let it be written to

But you get the drift, more stuff like this, more broken down, more low level commands to do stuff with sessions would be nice - but the ability to actually change session variables values easily would really be nice. :)

Get what I mean? :) Thanks a bunch :)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-16 18:23 UTC] sas at cvs dot php dot net
"[..] but the ability to actually change session variables values easily would really be nice."

Hm, so $foo = "new value" is too hard?

You can do pretty much everything what you describe with the current session module (including session_pickup, session_variables) by using the HTTP_SESSION_VARS array.

I currently don't see any use in supporting read-only session variables. 

Thank you.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 20:00:02 2026 UTC