RE: [PHP] dreaded sessions

2004-01-20 Thread Angelo Zanetti
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



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]
 
 


Re: [PHP] dreaded sessions

2004-01-19 Thread Greg Donald
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Matt Horner wrote:
| 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.
I'd say it has something to do with you transactions.  Can you duplicate
the errors using the same code on a system where the Innodb transactions
do not require committing?
Here is my own drop-in PHP session handling code if you care to compare
notes:
http://destiney.com/pub/php_db_sessions.tar.gz

I've never had a problem with it and I am using it with Innodb tables on
several projects currently.
I've also heard the Pear DB Session stuff is pretty good too, but I've
never tried it.
- --
**
*  ____  _   *
*  ___/ /__ ___ / /_(_)__  ___ __ __ ___  __ _   *
* / _  / -_)_-/ __/ / _ \/ -_) // // __/ _ \/  ' \  *
* \_,_/\__/___/\__/_/_//_/\__/\_, (_)__/\___/_/_/_/  *
*(___/ [EMAIL PROTECTED] *
**
BOFH Excuse #18:
excess surge protection
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFADFxtoAq8t3CabwcRAsKBAKCIY8Xp8GxXjVpg+fY6uy84t0WRAgCdH/Ao
mP6LQ6cy3qCuFeYLcS11exM=
=mUJI
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] dreaded sessions

2004-01-19 Thread Brian V Bonini
On Mon, 2004-01-19 at 17:38, Greg Donald wrote:

 I'd say it has something to do with you transactions.  Can you duplicate
 the errors using the same code on a system where the Innodb transactions
 do not require committing?
 
 Here is my own drop-in PHP session handling code if you care to compare
 notes:
 
 http://destiney.com/pub/php_db_sessions.tar.gz
 
 I've never had a problem with it and I am using it with Innodb tables on
 several projects currently.
 

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 :)


-- 
BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org


signature.asc
Description: This is a digitally signed message part


Re: [PHP] dreaded sessions

2004-01-19 Thread daniel
sorry i missed this thread, but what seems to be the problem with php
sessions ? I had to use phplib sessions on the works php3 server, which one
is better disk based sessions or database based sessions ? I have no
problem whatsoever with 60 concurrent users on a php session based system
but what about 100,000 concurrent users ???

 On Mon, 2004-01-19 at 17:38, Greg Donald wrote:

 I'd say it has something to do with you transactions.  Can you
 duplicate the errors using the same code on a system where the Innodb
 transactions do not require committing?

 Here is my own drop-in PHP session handling code if you care to
 compare notes:

 http://destiney.com/pub/php_db_sessions.tar.gz

 I've never had a problem with it and I am using it with Innodb tables
 on several projects currently.


 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 :)


 --
 BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
 =gpg
 --keyserver pgp.mit.edu --recv-keys 04A4F0DC GnuPG: http://gnupg.org
 http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
 Linux Registered User #339825 at http://counter.li.org

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



Re: [PHP] dreaded sessions

2004-01-19 Thread Greg Donald
-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