I have been using eperl until recently, but found Apache::ASP provides
useful session features that I like. Also, I am experienced with ASP. I
installed Apache::ASP and it seems to operate quite nicely most of the time.
However, there is some odd caching or some kind of saving going on because I
get the error "MySQL server has gone away" (in the error_log of that site).
My dbh routines are contained in a file subs.pl which I require "subs.pl"
from the main script, manage.phtml. If I don't use subs and include files I
will working on this until I'm about a billion years old.
I realized this could be due to connections not closed properly, so I
changed my script to call the sub that performs explicitly $dbh->disconnect.
Nope, this did not solve the problem.
I then tried to put undef($dbh) after the disconnect, and got this error on
the script the next time it was run:
"cannot call method prepare on an undefined value". Which basically means
that it thinks that $dbh is not defined although I define it in my file
"subs.pl". Like I said, there is some very wierd type of scripting going
on, whereas certain scripts appear to remain memory resident or are not
recompiled. I don't know. And this is even with StatINC=1.
My httpd.conf directives are
<Files ~ (\.phtml)>
AddHandler perl-script .phtml
PerlHandler Apache::ASP
PerlSetVar Global /tmp/asp # (yes, the directory exists and is chmod 777)
PerlSetVar GlobalPackage main # I need for access to "global" variables
PerlSetVar Debug 2
PerlSetVar StatINC 1 # this helped a little bit!
</Files>
I think this is a mod_perl/Apache::ASP problem becase It works just fine
under eperl.
I temporarily went back to eperl since the client wants to see this working
by tomorrow, I will use the Apache::Session module.
But that really sucks. I would like to get this thing working.
Thanks