Larry Leszczynski wrote:
Hi David -


MOD_PERL=mod_perl/1.99_07-dev

[cut]

It runs fine when accessed with http://hostname/cgi-bin/graffiti.pl.
However, when accessed with http://hostname/cgi-perl/graffiti.pl, I get:

Server error!
The server encountered an internal error and was unable to complete your
request.
Error message:
Failed opening session state file ./STATES/259344: No such file or
directory at /var/www/cgi-perl/graffiti.pl line 104.


That's a really old version of mod_perl 2. I think for that version,
ModPerl::Registry did not chdir to the script directory before running the
script (because of some thread-related problems).

And it still doesn't do that. It can't do that, since under threads it'll wreak havoc - as chdir affects all threads:
http://perl.apache.org/docs/2.0/user/porting/compat.html#C_Apache__Registry___C_Apache__PerlRun__and_Friends
http://perl.apache.org/docs/2.0/user/coding/coding.html#Thread_environment_Issues
http://perl.apache.org/docs/2.0/user/porting/compat.html#C__r_E_gt_chdir_file_


The most recent version of FindBin should work for mod_perl. So instead of requiring a file relatively use FindBin to find where the script's dir is.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to