Ellers wrote:
> 
> However the scripts are falling over very erratically. With debug level 2 I get 
>extensive messages about an undefined subroutine in a
> (custom) module - except it is _definitely_ there. I've checked exports and they're 
>all ok - and it works, SOMEtimes!
> 

Where?  What is the module name, what file?, and 
in what code does it get "use"d.  Please mention all the 
files that might load it, and what files it fails to get
used in. ( well mention some of them if the list is long, 
but examples of use is what I mean here )

> I have noted earlier posts to this group on this subject but I wasn't 100% sure of 
>the solution. For example, there was some mention about
> requiring a static build of Apache and mod_perl. I have no problem with that but I 
>don't understand why it would help and don't want to
> scrap the current installation until its fairly definitely the problem.
> 

Not yet, but it might be?  There could be other reasons for what you are 
getting, and they may have to do with tricky perl library issues that
can come up as well as other ASP oddities in how it uses the namespace.

>  - DSO Apache on debian linux

This could be bad, but let us save that for after we look at other
possible causes.

>    Apache was _not_ compiled on the box but apache, mod_perl and Apache::ASP were 
>all downloaded by debians apt-get/dselect
> programs. They all run really well most of the time, except for these annoying 
>failures!
> 
>  - StatINC turned on
> 

turn StatINC off.  If you no longer have the problems keep it off. :)

You can use Apache::StatINC or Apache::Reload modules for similar
functionality.  If you turn it off, and you keep having the problems
then it is probably something else.  If it is the problem, and you
would like to work through it, set StatINC, set Debug to -3, and 
get me a trace from your error_log from the server starting 
to the problem occuring ( plus another page of output just to be safe ).

>  - whenever I change an ASP script OR whenever I change one of my local .PM modules, 
>I want the ASP script to re-compile each and
> every time it is invoked by Apache. When the site is into production, this can be 
>optimized.
> 
> I had thought StatINC was what I'm after but now I'm not sure.
> 

You can also try StatINCMatch and see if that helps.  StatINC config might
be too aggressive for your needs.

> Main question:
>          - will a static build of Apache/mod_perl (most likely) fix problems where a 
>compile of an ASP script works one minute and fails the
> next?
> 

Maybe, but I would not jump to this first.

> Secondary question: (not sure if this question will make sense: )
> 
>          - is there a way to "clean compiles" out of the system? That is, 
>Apache::ASP seems to get a particular compiled version of a
> script "in its head" sometimes. This is demonstrated by changing the contents of a 
>script or a PM, pressing 'reload' and seeing the same
> stuff come up time and again. This is probably related to the main problem.
> 
> Thanks for any help, and sorry about the long post
> 

Apache::ASP should reload scripts just fine.  There are globals
issues which can largely be fixed with 

  PerlSetVar UseStrict 1

which allows you to use globals only when you declare them explicity with 

  use vars ($Global);

Another thing I would avoid is putting sub {} definitions in 
Apache::ASP scripts, and this can cause odd problems with 
variable scoping, and subroutine name collisions.  To avoid
this problem, puts subs in the global.asa, or some perl module.

Finally, Apache::ASP works with file modification times & system
times to do reloading.  Should your system time change, you will
likely need to restart your apache httpd to flush the caches.  Also,
as Tom recently mentioned, this setting can avoid some problems
if you don't mind the recompilation overhead:

  PerlSetVar NoCache 1

As far as reloading & script output, sometimes a browser will
need to have a ctrl-Reload (IE?) / shift-Reload (NS?) to force
the browser to reload a page and its contents when they have
been cached.  

--Josh

_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to