T
tedqn
Program: Aspell
I need to change the tempfile physical directory to the current
location of the page, ie.
/scriptfiles/speller/tmpfile where I can grant write permission to the
anonymous web account. I'm migrating the site to win 2003 server with
much stricter security. The program currently trying to create a temp
file in the windows temp directory
C:\WINDOWS\TEMP\KLkU8sBUpb\gZ0BZIy9BL which is the system direcotry and
was denied.
use File::Temp qw/ tempfile tempdir /;
....
my $dir = tempdir( CLEANUP => 1 );
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
# temp file was created properly?
# open temp file, add the submitted text.
for( my $i = 0; $i <= $#textinputs; $i++ ) {
$text = url_decode( $textinputs[$i] );
@lines = split( /\n/, $text );
print $fh "\%\n"; # exit terse mode
print $fh "^$input_separator\n";
print $fh "!\n"; # enter terse mode
for my $line ( @lines ) {
# use carat on each line to escape possible aspell commands
print $fh "^$line\n";
}
}
# exec aspell command
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" )
and return;
..........
Could not execute `"C:/Program Files/Aspell/bin/aspell" -a --lang=en_US
--encoding=utf-8 --add-extra-dicts=en_MED.rws <
C:\WINDOWS\TEMP\KLkU8sBUpb\gZ0BZIy9BL 2>&1`\nBad file descriptor
I need to change the tempfile physical directory to the current
location of the page, ie.
/scriptfiles/speller/tmpfile where I can grant write permission to the
anonymous web account. I'm migrating the site to win 2003 server with
much stricter security. The program currently trying to create a temp
file in the windows temp directory
C:\WINDOWS\TEMP\KLkU8sBUpb\gZ0BZIy9BL which is the system direcotry and
was denied.
use File::Temp qw/ tempfile tempdir /;
....
my $dir = tempdir( CLEANUP => 1 );
my( $fh, $tmpfilename ) = tempfile( DIR => $dir );
# temp file was created properly?
# open temp file, add the submitted text.
for( my $i = 0; $i <= $#textinputs; $i++ ) {
$text = url_decode( $textinputs[$i] );
@lines = split( /\n/, $text );
print $fh "\%\n"; # exit terse mode
print $fh "^$input_separator\n";
print $fh "!\n"; # enter terse mode
for my $line ( @lines ) {
# use carat on each line to escape possible aspell commands
print $fh "^$line\n";
}
}
# exec aspell command
my $cmd = "$aspell_cmd $aspell_opts < $tmpfilename 2>&1";
open ASPELL, "$cmd |" or handleError( "Could not execute `$cmd`\\n$!" )
and return;
..........
Could not execute `"C:/Program Files/Aspell/bin/aspell" -a --lang=en_US
--encoding=utf-8 --add-extra-dicts=en_MED.rws <
C:\WINDOWS\TEMP\KLkU8sBUpb\gZ0BZIy9BL 2>&1`\nBad file descriptor