Larry,

That was it. By setting STATE_DIR to the absolute path, the script now runs.

Can folks on this list perhaps share a little discussion about methods I
could use to "chdir to the right directory at script startup." It would
help to see a sampling of idea.

Thanks. :-)


At 11:57 PM 6/14/04 -0400, you 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).  If you print the
>current directory from inside your script somewhere e.g.:
>
>   print "<p>current directory is: ", `pwd`, "</p>";
>
>you'll probably find you're not in the directory you thought you were.
>
>You need to either chdir to the right directory at script startup, or
>define $STATE_DIR using an absolute path instead of a relative path.
>
>
>HTH,
>Larry
>
>
>
>
>

-- 
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