473,562 Members | 2,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_sav e_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_sav e_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_sav e_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_sav e_handler() with the appropriate
parameters, I just left them out for ease of reading.
Jul 16 '05 #1
2 2805
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_* "equivalent s"

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.t ele.dk...
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_sav e_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_sav e_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_sav e_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_sav e_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_* "equivalent s"

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.t ele.dk...
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_sav e_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_sav e_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_sav e_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_sav e_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
12025
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 on the server (in our own accounts on the same machine). When I am testing both versions of our program using the same browser (IE on Windows or...
6
6447
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 able to telnet to several routers concurrently and speed up the process of making changes. Is this feasible using python with its standard telnet...
3
2458
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 (IIS 5.0) with ASP 3.0 (no .NET on this site). Sometime, data in session is emptied. I say "sometime"
3
3702
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 visitor's browser's capabilities. The Javascript then calls main.php, passing back its findings with a GET string; main.php saves the data as a...
2
2945
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 cookieless sessions for a particular user, and if so, I'd instruct ASP.NET to turn on cookieless sessions for a particular user session. Is this...
12
2264
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 installed Deep Metrix Live Stats 6.2 XPS just to make sure nothing really strange was going on was going on. Still....the sessions only increment...or...
6
5043
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 gigantic gaps in my form. It SHOULD be set to display: none instead. Is this a setting in the control somewhere or is this just a huge oversight on...
6
3773
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 one day): \\FFDS24\ASP.NET Applications(_LM_W3SVC_1_Root_ATV2004)\Errors During Execution: 7 \\FFDS24\ASP.NET Apps...
3
28212
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 developer needs to know how to use. This article explains the basics of PHP Sessions. Assumptions: Basic PHP knowledge is required (variables, arrays...
0
7579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7874
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6228
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5198
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3626
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2075
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
907
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.