473,800 Members | 2,497 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 2818
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
12054
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 Konqueror on Linux) the session variables will mix up and only the latest selection or options will...
6
6472
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 lib?
3
2484
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
3722
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 visitor's profile in $_SESSION elements. It then serves up home.html and any further pages requested...
2
2973
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 possible? For example I want to use cookie based sessions by default for all users. But if a user has...
12
2297
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 should I say my counter in my asax file.... and never goes down. If it matters, this machine is...
6
5071
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 MS's part? If the latter, any suggestions for a workaround? Perhaps wrapping the validator in a...
6
3810
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 v1.1.4322(_LM_W3SVC_1_Root_ATV2004)\Compilations
3
28331
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 and such) HTML Forms. What are Sessions? Sessions are a way of storing data. When developing...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10507
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10279
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9092
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5473
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5607
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4150
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
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.