Thread Perl-Skripte auf IIS Server ausführen (28 answers)
Opened by perl-snaks at 2013-02-05 10:42

GwenDragon
 2013-02-14 09:18
#165773 #165773
User since
2005-01-17
14562 Artikel
Admin1
[Homepage]
user image
2013-02-13T08:44:34 perl-snaks
Wenn ich den gleichen Skript auf Windows 2008 Server mit IIS ausführe, läuft der Skript ohne fehler aber speichert mir keine Dateien wie beim Windows XP.
Es stellt sich die Frage, ob der Windowsnutzer/-gruppe unter dem/der das Skript ausgeführt hat, die Dateirechte zum Ändern des Verzeichnisinhalts hat.

Quote
Hierbei ein Abschnitt vom Skript.
Code: (dl )
1
2
3
4
5
6
7
8
9
10
 
my $file = "C:/Programme/Apache/cgi-bin";
print "$file\n";
print ">";
print "Your Report is finisched";
print "</a>";
open F, ">$file" #or quit("Unable to open output file for writing: $!");
binmode(F);
print F $response->content;
close F;


Weiss jemand wieso tritt das Problem auf?


Ich würde mal statt:
Code (perl): (dl )
1
2
3
4
open F, ">$file" #or quit("Unable to open output file for writing: $!");
binmode(F);
print F $response->content;
close F;

das
Code (perl): (dl )
1
2
3
4
5
my $fh;
open ($fh, ">", $file) or warn "Unable to open output file for writing: $!";
binmode($fh);
print $fh $response->content or warn "Unable to write to output file: $!";
close $fh or warn "Unable to open output file for writing: $!";

schreiben.
Und mal in die Logdateien des IIS schauen, ob da ein Fehler drin steht.
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Perl-Skripte auf IIS Server ausführen