You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Plymouth Rock <Tr...@newmail.ru> on 2005/11/09 04:52:55 UTC
2. ActivePerl vs mod_perl: unable to open a file
At using ActivePerl5.8.7 there isn't the problem with file opening, but at
using mod_perl2.0.2 it is:
print "Content-type: text/html\n\n";
$path = "textdata.txt";
open FH, $path;
while(<FH>) {print}
close FH
Why and how to solve the problem?
Thanx.
Re: 2. ActivePerl vs mod_perl: unable to open a file
Posted by Perrin Harkins <pe...@elem.com>.
Plymouth Rock wrote:
> At using ActivePerl5.8.7 there isn't the problem with file opening, but at
> using mod_perl2.0.2 it is:
>
> print "Content-type: text/html\n\n";
> $path = "textdata.txt";
You are using a relative path. Use an absolute path, or figure out the
path based on the location of the current script ($r->filename).
- Perrin