RE: delayed file uploads...

2001-12-03 Thread Chui G. Tey

Here is a hackish option:

place the 


Are global variables truly global?

2001-11-04 Thread Chui G. Tey

I have some state data that I need to persist between requests. At the
moment these are COM objects, but they'll be ported to Perl Classes. It
is quite important that only one of these instances exist per web
server. These instances are too large to write and read to file on every
request. So I have defined the variable as a package level variable.

I have been instantiating the variable in my handler() routine if it has
not already been instantiated. ie.

package Apache::MyPkg;

my $COM_instance;

sub handler {

   if (!$COM_instance) {
   $COM_instance = Win32::OLE->new("ProgID.Class");
   }

}

Will the different child processes created by Apache share the same
variable? Or will each child create an additional instance? I'm happy to
lose the data if Apache falls over.

Chui Tey
Software Engineer
Advanced Data Integration
PO Box 660
Spring Hill QLD 4004
AUSTRALIA
Ph:07 3250 5300
Fax: 07 3250 5399
[mailto: [EMAIL PROTECTED]  ]
 



Apache::RequestNotes and sharing information

2001-10-18 Thread Chui G. Tey



I am using 
RequestNotes with PerlAccessHandler and a PerlHandler.
 
When the browser 
connects for the first time,
The 
PerlAccessHandler sets a session_based cookie, using TIEHASH
$r->pnotes("COOKIES")->{'SESSION_ID'} = 
$session{_session_id};
 
And the PerlHandler 
retrieves the session_id using
$session_id = $r->pnotes("COOKIES")->{'SESSION_ID'} 

 
To my surprise, in the PerlHandler $r->pnotes("COOKIES")->{'SESSION_ID'} has not been 
set.
Is there any way to 
share data between different handlers?
 
Chui Tey
Software Engineer
Advanced Data Integration
PO Box 660
Spring Hill QLD 4004
AUSTRALIA
Ph:07 3250 5300
Fax: 07 3250 5399
[mailto: [EMAIL PROTECTED]]
 
 


Apache::Session WindowsNT File Locking problems

2001-10-16 Thread Chui G. Tey



Hi,
 
I'm using the 
precompiled binaries of Apache 1.3.20 + mod_perl on WinNT. 
I have grabbed 
Apache::Session 1.54 and nmake test fails at 99dbfile.t.
The test routine 
basically hangs, and the culprit is in one of the last 
lines:
 
tied(%$s)->delete;
 
It seems to be some 
kind of file locking problem. I stepped through the code and I seem to 
have a 
problem with Autoloader loading Fcntl.
Has anyone else 
experienced this, and could perhaps suggest a way to resolve 
this?
 
Thanks.
 
Chui Tey
Software Engineer
Advanced Data Integration
PO Box 660
Spring Hill QLD 4004
AUSTRALIA
Ph:07 3250 5300
Fax: 07 3250 5399
[mailto: [EMAIL PROTECTED]]