473,383 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Sessions. Argh.

Hi...

I'm trying my hardest to understand fully how sessions work and how best to
use them. However, all I can find is information that doesn't tell me
anything other than that sessions store information between pages, which I
knew already. I want to know HOW sessions work! If anybody has any good
links to material that explains sessions fully, then please send those links
this way!

I'm particularly interested in the session_set_save_handler() function, and
an in depth explanation of how PHP uses the provided functions. The PHP
manual does little to explain this. My problems are coming from trying to
impliment a session handling class, and for the life of me I cannot figure
out why and where the calls to my defined open, close, read, write, destroy
and gc functions are coming from!

Am I right in assuming that after I've used the session_set_save_handler()
function and provided it with the 6 functions it needs, all I need to then
do is use $_SESSION variables normally? For instance, if after I've called
session_set_save_handler() and I do this:

$_SESSION['required_info'] = "Sessions in PHP. Argh!";

then my custom functions will be called by PHP? Or have I totally
misunderstood everything?

P.

p.s. I am calling session_set_save_handler() with the appropriate
parameters, I just left them out for ease of reading.
Jul 16 '05 #1
2 2793
After much hacking and loss of hair, I have cracked it. The problem I was
having was with the difference between certain mysql_* functions and their
odbc_* "equivalents"

But I would still like to know any links to useful documentation about
sessions and security using sessions.

P.

"The Plankmeister" <pl******************@hotmail.com> wrote in message
news:3f***********************@dread15.news.tele.d k...
Hi...

I'm trying my hardest to understand fully how sessions work and how best to use them. However, all I can find is information that doesn't tell me
anything other than that sessions store information between pages, which I
knew already. I want to know HOW sessions work! If anybody has any good
links to material that explains sessions fully, then please send those links this way!

I'm particularly interested in the session_set_save_handler() function, and an in depth explanation of how PHP uses the provided functions. The PHP
manual does little to explain this. My problems are coming from trying to
impliment a session handling class, and for the life of me I cannot figure
out why and where the calls to my defined open, close, read, write, destroy and gc functions are coming from!

Am I right in assuming that after I've used the session_set_save_handler()
function and provided it with the 6 functions it needs, all I need to then
do is use $_SESSION variables normally? For instance, if after I've called
session_set_save_handler() and I do this:

$_SESSION['required_info'] = "Sessions in PHP. Argh!";

then my custom functions will be called by PHP? Or have I totally
misunderstood everything?

P.

p.s. I am calling session_set_save_handler() with the appropriate
parameters, I just left them out for ease of reading.

Jul 16 '05 #2
On Fri, 12 Sep 2003 15:35:01 +0200, The Plankmeister wrote:
After much hacking and loss of hair, I have cracked it. The problem I was
having was with the difference between certain mysql_* functions and their
odbc_* "equivalents"

But I would still like to know any links to useful documentation about
sessions and security using sessions.

P.

"The Plankmeister" <pl******************@hotmail.com> wrote in message
news:3f***********************@dread15.news.tele.d k...
Hi...

I'm trying my hardest to understand fully how sessions work and how best

to
use them. However, all I can find is information that doesn't tell me
anything other than that sessions store information between pages, which I
knew already. I want to know HOW sessions work! If anybody has any good
links to material that explains sessions fully, then please send those

links
this way!

I'm particularly interested in the session_set_save_handler() function,

and
an in depth explanation of how PHP uses the provided functions. The PHP
manual does little to explain this. My problems are coming from trying to
impliment a session handling class, and for the life of me I cannot figure
out why and where the calls to my defined open, close, read, write,

destroy
and gc functions are coming from!

Am I right in assuming that after I've used the session_set_save_handler()
function and provided it with the 6 functions it needs, all I need to then
do is use $_SESSION variables normally? For instance, if after I've called
session_set_save_handler() and I do this:

$_SESSION['required_info'] = "Sessions in PHP. Argh!";

then my custom functions will be called by PHP? Or have I totally
misunderstood everything?

P.

p.s. I am calling session_set_save_handler() with the appropriate
parameters, I just left them out for ease of reading.


Actually I'm a little suprised you didn't find much help in the Manual. I
keep a 'one page' html copy so I can search the entire document for
whatever is giving me fits. I just searched for 'session management'
about two days ago and found the info quite elaborate and helpful.. In
fact, I got a LOT more info than I needed.. but better too much than that
nagging feeling of 'not enough'.. :-(

Glad you found your answers..

Mike
Houston, Tx
.....................
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
6
by: Richard Bird CCNP, CCDP, MCSE, etc. | last post by:
I need some help adding multithreading to an existing python script. The script was developed to telnet and make changes on a list of cisco routers. I figure that by adding multithreading, I'd be...
3
by: Maxime Ducharme | last post by:
Hi group We have a problem with sessions in one of our sites. Sessions are used to store login info & some other infos (no objects are stored in sessions). We are using Windows 2000 Server...
3
by: Will Woodhull | last post by:
Hi, I'm new here-- I've been reading the group for a couple of days. Nice group; I like the way n00b33 questions are handled. I've been using a Javascript routine in index.html to determine a...
2
by: Steve Franks | last post by:
According to the docs you tell ASP.NET to use cookieless sessions by setting a value in the config.web file. However, what if I wanted to determine at run time whether or not I wanted to use...
12
by: D. Shane Fowlkes | last post by:
This is a repost (pasted below). Since my original post, I've double checked the system clock and set all IIS Session Timeout values to 10 minutes. Still ...the problem occurs. I've also...
6
by: darrel | last post by:
I'm using some validators for a form. I'm noticing that it writes the text out to the browser as a SPAN with it's visibility set to none. The problem is that it still takes up space, so I have...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
3
Atli
by: Atli | last post by:
Introduction: Sessions are one of the simplest and more powerful tools in a web developers arsenal. This tool is invaluable in dynamic web page development and it is one of those things every...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.