Re: [PHP-DEV] keeping descriptors in persistent connections

2001-06-29 Thread Thies C. Arntzen

On Thu, Jun 28, 2001 at 11:18:11AM +0200, [EMAIL PROTECTED] wrote:
 Hello Joao,
 
 On Wed, 27 Jun 2001, Joao Conceicao wrote:
 
  Hi,
  I'm having a problem making a module that uses persistent connections.
  It's possible to reuse the same descriptors (file descriptors) in two
  diferent pages? How?

see
http://marc.theaimsgroup.com/?l=php-generalm=96142518330489w=2
for some __sleep __wakeupp sample code.
tc

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: [srm] Re: [PHP-DEV] keeping descriptors in persistent connections

2001-06-29 Thread derick

On Thu, 28 Jun 2001, Thies C. Arntzen wrote:

 On Thu, Jun 28, 2001 at 11:18:11AM +0200, [EMAIL PROTECTED] wrote:
  Hello Joao,
 
  On Wed, 27 Jun 2001, Joao Conceicao wrote:
 
   Hi,
   I'm having a problem making a module that uses persistent connections.
   It's possible to reuse the same descriptors (file descriptors) in two
   diferent pages? How?

 see
 http://marc.theaimsgroup.com/?l=php-generalm=96142518330489w=2
 for some __sleep __wakeupp sample code.

The sleep and wakeup features are very nice, but you can never make a real
persistent filedescriptor.

regards,

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] keeping descriptors in persistent connections

2001-06-28 Thread derick

Hello Joao,

On Wed, 27 Jun 2001, Joao Conceicao wrote:

 Hi,
 I'm having a problem making a module that uses persistent connections.
 It's possible to reuse the same descriptors (file descriptors) in two
 diferent pages? How?

It's not really possible with PHP to do this. Of course there are
persistent connections to databases, but these are per Apache child, which
will be recycled after a number of requests. And you can never be sure if
the next page request is handled by the same Apache child. With database
connections this is not really a problem, as the connections will be
opened per Apache child (and so you'll end up with the same number of
conncetions to the database, as there are Apache child processes).

This was one of the reasons that SRM was developed. SRM is a deamon
program which can be used from PHP to manage data structures
(such as Filedescriptors) which won't be destroyed when an Apache child
dies (because they are used from the deamon). SRM was built in such a way
that modules (like a fileaccessing module) can be easily added. The API is
a little easier then PHP even. For more information about SRM or how to
write such modules, see http://www.vl-srm.net/ or feel free to contact me.

regards,

Derick Rethans

-
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
 SRM: Site Resource Manager - www.vl-srm.net
-


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] keeping descriptors in persistent connections

2001-06-27 Thread Joao Conceicao

Hi,
I'm having a problem making a module that uses persistent connections.
It's possible to reuse the same descriptors (file descriptors) in two
diferent pages? How?

How does it works in PGSQL and MYSQL? Don't they keep information about
the descriptors?

Thanks,

--
./ João Conceição



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]