Zu den Aufzeichnungen der tutorials.de-Live-Workshops
ERLEDIGT
NEIN
ANTWORTEN
4
ZUGRIFFE
1482
EMPFEHLEN
  • An Twitter übertragen
  • An Facebook übertragen
AUF DIESES THEMA
ANTWORTEN
  1. #1
    Registriert seit
    Aug 2001
    Beiträge
    818
    Hallo Leute,

    ich habe eine Umfrage-Software (Sawtooth Software) auf CGI-Basis, die bie mir partout nicht laufen möchte. Weder auf dem Windows 2008 Server (wo es am liebsten laufen sollte), nohc auf meinem localhost zum Testen. Beides auf XAMPP/ LAMPP Basis, wobei der Xampp auf dem Windows 2008 Server unseren Sicherheitsrichtlinien genügt.

    Egal was ich tue, der Aufruf einer .pl Datei resultiert in einem Error 403 "Zugriff verweigert". Nach dem ich nun schon sehr lange herum probiert habe (und die httpd.conf editiert habe), habe ich heraus gefunden, dass die Ausführung eines Test-CGI Scripts (liegt ja einer xampp installation bei) nur dann erfolgt, wenn die Datei keine Endung hat. Sobald die Test-Cgi in test-cgi.pl umbenannt wird, geht nichts mehr: der Error 403 tritt auf.

    Da die Umfrage-Software nicht verändert werden darf (und sollte), muss ich .pl Dateien zum Laufen bekommen. Das klappt nur nicht so recht. In der httpd.conf findet sich u.a. folgender Eintrag:

    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    
    <IfModule alias_module>
        #
        # Redirect: Allows you to tell clients about documents that used to 
        # exist in your server's namespace, but do not anymore. The client 
        # will make a new request for the document at its new location.
        # Example:
        # Redirect permanent /foo http://www.example.com/bar
     
        #
        # Alias: Maps web paths into filesystem paths and is used to
        # access content that does not live under the DocumentRoot.
        # Example:
        # Alias /webpath /full/filesystem/path
        #
        # If you include a trailing / on /webpath then the server will
        # require it to be present in the URL.  You will also likely
        # need to provide a <Directory> section to allow access to
        # the filesystem path.
     
        #
        # ScriptAlias: This controls which directories contain server scripts. 
        # ScriptAliases are essentially the same as Aliases, except that
        # documents in the target directory are treated as applications and
        # run by the server when requested rather than as documents sent to the
        # client.  The same rules about trailing "/" apply to ScriptAlias
        # directives as to Alias.
        #
        ScriptAlias /cgi-bin/ "/opt/lampp/htdocs/cgi-bin/"
     
    </IfModule>

    und

    Code :
    1
    2
    3
    4
    5
    6
    
    <Directory "/opt/lampp/htdocs/cgi-bin">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>

    sowie

    Code :
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    
    <IfModule mime_module>
        #
        # TypesConfig points to the file containing the list of mappings from
        # filename extension to MIME-type.
        #
        TypesConfig etc/mime.types
     
        #
        # AddType allows you to add to or override the MIME configuration
        # file specified in TypesConfig for specific file types.
        #
        #AddType application/x-gzip .tgz
        #
        # AddEncoding allows you to have certain browsers uncompress
        # information on the fly. Note: Not all browsers support this.
        #
        #AddEncoding x-compress .Z
        #AddEncoding x-gzip .gz .tgz
        #
        # If the AddEncoding directives above are commented-out, then you
        # probably should define those extensions to indicate media types:
        #
        AddType application/x-compress .Z
        AddType application/x-gzip .gz .tgz
     
        #
        # AddHandler allows you to map certain file extensions to "handlers":
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action directive (see below)
        #
        # To use CGI scripts outside of ScriptAliased directories:
        # (You will also need to add "ExecCGI" to the "Options" directive.)
        #
        #AddHandler cgi-script .cgi
        # XAMPP, since LAMPP 0.9.8:
        AddHandler cgi-script .cgi .pl
     
        # For files that include their own HTTP headers:
        #AddHandler send-as-is asis
     
        # For server-parsed imagemap files:
        #AddHandler imap-file map
     
        # For type maps (negotiated resources):
        #AddHandler type-map var
     
        #
        # Filters allow you to process content before it is sent to the client.
        #
        # To parse .shtml files for server-side includes (SSI):
        # (You will also need to add "Includes" to the "Options" directive.)
        #
        # XAMPP
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
    </IfModule>

    Könnt ihr mir helfen? Zunächst reicht mir das Starten der Software lokal, da ich ungerne auf dem Produktivserver (Windows 2008 Server) herumspielen möchte. Erst, wenn ich den Fehler bzw. den Auslöser des Problems kenne, wage ich mich daran. Daher hier auch Linux Pfade, da der Localhost ein Ubuntu Linux ist.

    Vielen Dank!

    Grüße
    mille
     
    man wird erwachsen ....

  2. #2
    renee renee ist offline Mitglied Brokat
    Registriert seit
    Jan 2004
    Beiträge
    332
    In der Directory-Direktive schaltest Du alle Optionen aus. Mach mal:

    Code :
    1
    2
    3
    4
    5
    6
    7
    
    <Directory "/opt/lampp/htdocs/cgi-bin">
        AllowOverride None
        Options +ExecCGI
        AddHandler cgi-script .pl .cgi
        Order allow,deny
        Allow from all
    </Directory>
     

  3. #3
    Registriert seit
    Aug 2001
    Beiträge
    818
    Hallo renee,

    vielen Dank für deine Hilfe!
    Unter Ubuntu hab ich das Problem damit beseitigen können. Morgen probier ich mittels gleichen Tipp die Behebung am Windows 2008 Server aus.

    Eine Rückmeldung folgt dann!

    Grüße
    mille
     
    man wird erwachsen ....

  4. #4
    Avatar von Dr Dau
    Dr Dau Dr Dau ist offline ich wisch hier durch
    Registriert seit
    Feb 2005
    Ort
    hinterm Mond gleich Links
    Beiträge
    6.160
    Blog-Einträge
    4
    Hallo!

    Denke daran dass Windows nicht Linux ist.
    Du musst also entweder die "Shebang" in allen Scripten an die Windowsumgebung anpassen oder Apache beibringen wo er den Scriptinterpreter findet (httpd.conf --> "ScriptInterpreterSource registry" --> dazu muss der Registry aber bekannt sein wo sich Perl befindet).

    Gruss Dr Dau
     
    Schri-Schra-Schrödi *g*
    mehrspaltiges/zeiliges Seitenlayout mit DIV's und CSS
    Dinge, die mit Tabellen besser klappen als mit CSS
    Ausgabe von Datum/Zeit unabhängig von der Server Zeitzone [php]
    Meine Links zum Thema Linux (Last update: 29.10.2011)
    Kein Busen ist so flach wie das Niveau dieser Party!
    ----
    Alte Weisheit: wer uns in den Arsch kriecht wird beschissen!
    ----
    Ich habe 3 Kinder und kein Geld!
    Warum kann ich nicht keine Kinder haben und 3 Geld?! (Homer Jay Simpson)

  5. #5
    Registriert seit
    Aug 2001
    Beiträge
    818
    Hallo Leute,

    hat alles bestens geklappt.
    Vielen Dank.

    Das Problem ist sowohl unter Linux als auch auf dem Windows Server 2008 behoben. Unter Windows musste nach der Shebang allerdings nicht der Pfad zum xampp/perl/bin angegeben werden, sondern eine andere Perl installation. Diese hat ihren Dienst dann auch nicht mit einem Error 500 quittiert.

    Beste Grüße
    mille
     
    man wird erwachsen ....

Ähnliche Themen

  1. Antworten: 7
    Letzter Beitrag: 22.12.09, 18:45
  2. Antworten: 3
    Letzter Beitrag: 08.04.08, 16:06
  3. CSS wird nicht ausgeführt
    Von Zank im Forum CSS
    Antworten: 7
    Letzter Beitrag: 04.01.07, 17:14
  4. SQL wird nicht ausgeführt
    Von Azi im Forum PHP
    Antworten: 3
    Letzter Beitrag: 11.11.06, 13:11
  5. while wird nicht ausgeführt
    Von ICPUI im Forum PHP
    Antworten: 2
    Letzter Beitrag: 18.01.06, 18:06