Philip Mak wrote:
>On Sat, 8 Sep 2001, Joshua Chamas wrote:
>
>>I think your analysis is right, that Script_OnStart is not
>>always being called, and the reason is that it is not always
>>being found in the global.asa ... I don't know how it would
>>work sometimes & not others. A trace from the error_log
>>with Debug set to -1 would help from a fresh apache stop/start
>>through when the problem occurs.
>>
>
>I have attached the error log (might be pointless now since I fixed the
>problem---see below, but just in case you want it to investigate why
>this problem happened in the first place). Here's what I did:
>
>1. Start Apache
>2. Load script in my browser (it gets an error)
>3. Type "touch global.asa"
>4. Load script in my browser again (it works this time)
>
>>I get the feeling that something is manipulating the symbol
>>table in the *main:: package namespace where your GlobalPackage
>>is set. It may be that if you change GlobalPackage to
>>something else, they you will be safe from that. I can
>>imagine that certain kinds of packages like Apache::StatINC
>>or Apache::Reload might do these symbol table manipulations,
>>so try seeing if using those might be the problem too.
>>
>
>I tried running it without the "PerlSetVar StatINC 1" line in my
>configuration, but I still got the error.
>
>I just tried changing the GlobalPackage to "foo" and now it works. I guess
>it was something clobbering the "main" package, so I shouldn't use that
>package name anymore?
>
>Programming technique question: What's the right way of sharing global
>variables with my *.pm files? The reason I'm using GlobalPackage is so
>that I can refer to (e.g.) $dbh by typing $foo::dbh. Is that the right way
>of doing it? It does get a bit tedious having to type $foo::dbh a lot
>instead of just $dbh.
>
then put this in Script_OnStart: *main::dbh = *foo::dbh. It will make
main::dbh an alias for foo::dbh.
>
>
>>Also, try to avoid having multiple global.asa's from multiple
>>ASP applications having the same global package.
>>
>
>I only have one global.asa running on this Apache server.
>
HTH,
--Quentin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]