perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <>
Subject Re: Graphics and mod_perl
Date Thu, 03 Oct 2002 16:30:06 GMT
On Wed, 2 Oct 2002, Justin Luster wrote:

> I'm new to mod_perl and I'm really enjoying it.  It has really improved
> performance.  Right now I'm just using Modperl::Registry to speed up
> things.  I have a question about showing graphics using a Perl Script
> and running it through mod_perl.  
[ ... ] 
> It seems that the current working directory for the Perl scripts when
> run under mod_perl is in the bin directory where Apache.exe is.  

That behaviour was introduced into Win32 Apache some time back,
one reason being, as I understand it, is so that one could
double-click on the Apache icon to start it up.

>  I have considered using absolute paths but even that does not
> seem to work correctly with graphics.
[ ... ] 
As Per Einar mentioned in an earlier reply, using absolute server
paths is the best solution - generally, for cgi and registry
scripts, one should not rely on an assumption of a current
working directory. There is a module, FindBin, which reveals the
directory of a script, but as explained in the perl-5.8 docs for
FindBin, there's some caveats to using it under mod_perl and
other persistant Perl environments.

best regards,
randy kobes

View raw message