Schrift
Wiki:Tipp zum Debugging: use Data::Dumper; local $Data::Dumper::Useqq = 1; print Dumper \@var;
[thread]3072[/thread]

Apache Fehlkonfiguration(cgi)

Leser: 1


<< |< 1 2 >| >> 11 Einträge, 2 Seiten
SirLant
 2003-08-19 17:38
#30665 #30665
User since
2003-08-04
516 Artikel
BenutzerIn
[default_avatar]
Mein Apache2 bringt neuerdings folgende Meldung
Quote
[Tue Aug 19 15:40:07 2003] [error] [client 127.0.0.1] (OS 3)Das System kann den angegebenen Pfad nicht finden. : couldn't create child process: 720003: counter.cgi
[Tue Aug 19 15:40:07 2003] [error] [client 127.0.0.1] (OS 3)Das System kann den angegebenen Pfad nicht finden. : couldn't spawn child process: E:/WWW/cgi-bin/counter.cgi


Ich habe jedoch nichts verändert, was muss ich da denn überprüfen?
Weiß ehrlich gesagt nicht wo der Fehler liegen könnte.

OS win2k\n\n

<!--EDIT|SirLant|1061300331-->
--Programming today is a race between Software Enginers striving to build bigger and better idiot-proof Programs,
and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning!
jan
 2003-08-19 17:41
#30666 #30666
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
wie sieht der shebang aus?
SirLant
 2003-08-19 17:51
#30667 #30667
User since
2003-08-04
516 Artikel
BenutzerIn
[default_avatar]
!#e:/programme/perl/bin/perl.exe


Edit:
Ne du darfst mich hauen:
Code (perl): (dl )
#!/usr/bin/perl -w


Jetzt weiß ich auch weshalb einige scripte nicht gingen\n\n

<!--EDIT|SirLant|1061301140-->
--Programming today is a race between Software Enginers striving to build bigger and better idiot-proof Programs,
and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning!
jan
 2003-08-19 18:07
#30668 #30668
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
;) wir könnten eigentlich einen eliza modifizieren, der durch ein paar standardfragen die meisten fehler abschöpft, weil sie nur flüchtigkeitsfehler sind
Crian
 2003-08-19 18:41
#30669 #30669
User since
2003-08-04
5866 Artikel
ModeratorIn
[Homepage]
user image
:lol: gute Idee... am besten als Befragung des Fragenden, bevor er seinen Artikel abschicken darf ;)
s--Pevna-;s.([a-z]).chr((ord($1)-84)%26+97).gee; s^([A-Z])^chr((ord($1)-52)%26+65)^gee;print;

use strict; use warnings; Link zu meiner Perlseite
format_c
 2003-08-19 18:48
#30670 #30670
User since
2003-08-04
1706 Artikel
HausmeisterIn
[Homepage] [default_avatar]
Dann hätten wir doch gar nix mehr zu tun hier ;)

Gruß Alex
SirLant
 2003-08-19 18:50
#30671 #30671
User since
2003-08-04
516 Artikel
BenutzerIn
[default_avatar]
Und ihr hättet nicht über meinen Fehler lachen können :D
--Programming today is a race between Software Enginers striving to build bigger and better idiot-proof Programs,
and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning!
Strat
 2003-08-19 19:43
#30672 #30672
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
Ich hatte frueher haeufig dasselbe Problem, weil ich unter Win2k oder so entwickelte und das Zeug dann via ftp oder so auf eine Linux/Solaris-Kiste hochlud. Und da war ich stehts in Gefahr, das Aendern des Shebangs zu vergessen...

Dann habe ich in der httpd.conf folgende Option entdeckt:
Quote
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the symbols
# pound (#) and exclamation (!) followed by the path of the program that
# can execute this specific script.  For a perl script, with perl.exe in
# the C:\Program Files\Perl directory, the shebang line should be:

  #!c:/program files/perl/perl

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file.  Of course, CGI processing must be enabled by
# the appropriate ScriptAlias or Options ExecCGI directives for the files
# or directory in question.
#
# However, Apache on Windows allows either the Unix behavior above, or can
# use the Registry to match files by extention.  The command to execute
# a file of this type is retrieved from the registry by the same method as
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View menu,
# 'Folder Options', and reviewing the 'File Types' tab.  Clicking the Edit
# button allows you to modify the Actions, of which Apache 1.3 attempts to
# perform the 'Open' Action, and failing that it will try the shebang line.
# This behavior is subject to change in Apache release 2.0.
#
# Each mechanism has it's own specific security weaknesses, from the means
# to run a program you didn't intend the website owner to invoke, and the
# best method is a matter of great debate.
#
# To enable the this Windows specific behavior (and therefore -disable- the
# equivilant Unix behavior), uncomment the following directive:
ScriptInterpreterSource registry


Und wenn Perl ordnungsgemaess einen Perl-Interpreter zugeordnet ist, funktioniert das auch wunderbar. Ob es zugeordnet ist, merkt man, wenn man versucht, das Script ohne den Perl-Aufruf vorher zu starten, z.B.
script.pl
script.cgi

wenn beide funktionieren, dann geht es so; falls nicht, kloppt man folgende kommandos in die cmd.exe:
Code: (dl )
1
2
3
assoc .pl=Perl
assoc .cgi=Perl
ftype Perl="E:\apps\gnu\Perl58\bin\perl.exe" "%1" %*

oder so (Der Pfad zu Perl muss natuerlich angepasst werden).
Diese vorgehensweise hat auch noch den Vorteil, dass man da mit den Endungen variieren kann, z.B. .pl8 fuer perl5.8, .pl6 fuer perl5.6, ... und parallel mehrere interpreter benutzen kann (auch mit cgi).

Denn dann kann ich #! /usr/bin/perl verwenden, und alle sind gluecklich ;-)\n\n

<!--EDIT|Strat|1061307906-->
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/
jan
 2003-08-19 19:59
#30673 #30673
User since
2003-08-04
2536 Artikel
ModeratorIn
[Homepage] [default_avatar]
man kann auch perl auf der selben festplatte wie apache ins verzeichnis \usr\ installieren, also zB c:\usr\. dann wird perl über /usr/bin/perl korrekt gefunden.
Strat
 2003-08-19 20:26
#30674 #30674
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
[quote=jan,19.08.2003, 17:59]man kann auch perl auf der selben festplatte wie apache ins verzeichnis \usr\ installieren, also zB c:\usr\. dann wird perl über /usr/bin/perl korrekt gefunden.[/quote]
Kann man auch, aber wenn man dann mehrere Perl-Versionen parallel haben will, wird's heftig. Und wenn man vorgefertigte Pakete wie WAMPP verwendet, dann wird's sogar ziemlich heftig...
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/
<< |< 1 2 >| >> 11 Einträge, 2 Seiten



View all threads created 2003-08-19 17:38.