RE: [PHP] dreaded sessions

2004-01-20 Thread Matt Horner

Thanks to all who have responded.  I have actually only switched
to the Innodb
tables after I had this same problem with creating the files.
The same problem
occurs whether I am using the files or the database. 

Basically, I have performed the steps in verifying that my data
is saved in the
table (or file).

1. Login into the system
2. After the screen is fully rendered, perform a select
and verify that the data is in the table.
3. After verifying that the data is in the table, perform
a simple operation on the system.
4. I create an instance to the object that handles writing the 
data to the database (which does a
session_set_save_handler).
No errors are reported during the creation of the
object.
5. Then, call session_start from the main script.
6. During the session_start the read handler is called and does
a
query to the database to find the data for my session,
based on
session id. The query does not error, and after the
execute is
performed, I print the numRows() of the query and see a
zero.

Now, this is all at the very beginning of my script, nothing
else has 
had their hands in the session information to this point.
However, I 
am losing the session, and this is seriously happening both with
the 
files and database method.  

Hope this makes more sense than my last post.  

Thanks again!
Matt


-Original Message-
From: Angelo Zanetti [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 20, 2004 5:45 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] dreaded sessions


just out of interest sake why do you use INNODb? cant you use the normal
(no
transaction support) MySQL DB??



-Original Message-
From: Greg Donald [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 2:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] dreaded sessions


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brian V Bonini wrote:
| Kind of funny... Back before PHP had sessions this was how everyone
did
| it and everyone wished for session support in PHP, now that it's had
it
| for a while :)

I hear ya.  I recall a job interview in like 1999 or something where I
was asked if I had used phplib before.  They were using FreeBSD and
STABLE still only had PHP3 available at the time.


- --
**
*  ____  _   *
*  ___/ /__ ___ / /_(_)__  ___ __ __ ___  __ _   *
* / _  / -_)_-/ __/ / _ \/ -_) // // __/ _ \/  ' \  *
* \_,_/\__/___/\__/_/_//_/\__/\_, (_)__/\___/_/_/_/  *
*(___/ [EMAIL PROTECTED] *
**
BOFH Excuse #205:
Quantum dynamics are affecting the transistors

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFADHBfoAq8t3CabwcRAqfFAKCfZx0569fHld9e5F14UnVSOZe2EACgodYI
17jm+trWEQr1oFwEvsMK688=
=meaR
-END PGP SIGNATURE-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] dreaded sessions

2004-01-19 Thread Matt Horner
Hi all,
 
Sessions have become one my nightmares.  Unfortunately, I have built
a system based on sessions 
and for some reason I having some really irritating issues.
 
Simply here is my problem:

After logging into the system, I set a session with information for
the Username and Password for verifiying
the user's login into the system, that way I don't have to
continually ask for the information or pass
in the forms.  
 
Currently I am using a database to store sessions, which I have
however encountered the same errors with file
based sessions.  When I restart the session, it performs a selection
from the database on SESS ID.  However,
in very consistently inconsistent points the selection returns 0
results.  However, I checked the database for the
session data and found that the session information was gone from
the previous write.  But 
I am using an Innodb table and committing the transaction.  Odd?
 
I am calling the session_write_close function at the end of the
transaction, to push the session through.  Also,
in the session_destroy handler I put a debugging message to see if
the session was being destroyed and that is
not the situation either.  
 
Anybody have similar problems with delayed in session writing or
lost session data?  I register all of the data into
the session that I need leave the session alone except for reading
of the session data.
 
Thanks in advance!
Matt 
 
Matt Horner
Programmer/Anaylst
WIREdata Corporation
[EMAIL PROTECTED]