|
Posted by Erwin Moller on 01/25/07 10:52
Toby Inkster wrote:
> Erwin Moller wrote:
>
>> And as Jerry said: connections to a database are NOT fit to store in a
>> session because PHP destroys all existing connections when the script
>> ends.
>
> Actually...
> http://uk2.php.net/manual/en/features.persistent-connections.php
>
Well, that is not relevant in this discussion I think.
Persistent connections as implemented by PHP only mean that PHP will not
close the actual databaseconnection, and will reuse it as the username,
password, database, etc are excactly the same.
But this happens behind your back without control (from a scripters
point-of-view) and they are only there to speed up the authentication
process.
This means you still have to rebuild the connection next invocation to the
script because the persistent connection is still ended when the script
ends. (Not really closed, but from the scripts point-of-view it is. You
have to re-authenticate yourself by supplying
username/password/database/etc.)
At least that is how I understand the matter. Am I missing something here?
Very well possible. :-)
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|