Zurück tutorials.de > Programming > CGI, Perl, Python, Ruby

 
 
Hallo und herzlich willkommen! Tutorials.de ist eine Hilfe-Community mit dem Motto User helfen Usern. Als Gast verfügst Du über Schreibrechte in unseren Foren und Blogs. Du kannst dich aber gerne auch kostenlos registrieren und Teil unserer Gemeinschaft werden! Viel Spaß & Erfolg bei der Vermehrung deines Wissens :-)

Themen: 242.975 | Beiträge: 1.352.293 | Mitglieder: 169.418 (Stand 28.01.10) | Fragen zur Nutzung von Tutorials.de? Nutzungsregeln | Kontaktformular | Impressum

Jubiläums-Countdown 23.02 23.03 23.04 23.05 23.06 23.07 23.08 23.09


4 kostenlose Bücher bei unserer Buch-Verschenkaktion 03/2010
  AntwortAntworten (über Gastzugang)    
  AntwortAntworten (über Gastzugang)    
 
Themen-Optionen Ansicht
Alt 09.02.10, 11:55   #1 (permalink)
 
Benutzerbild von mille  
 
Registriert seit: Aug 2001
Ort: cottbus (brandenburg)
Beiträge: 809
Renommee-Modifikator: 21
mille hat eine blütenweiße Weste

Perl-Skript wird nicht ausgeführt

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:
<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:
<Directory "/opt/lampp/htdocs/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
sowie

Code:
<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 .... symbiolab.de auch
  mille ist offline  
 
Alt 09.02.10, 20:54   #2 (permalink)
Mitglied Brokat
 
Registriert seit: Jan 2004
Beiträge: 316
Renommee-Modifikator: 14
renee sorgt für eine eindrucksvolle Atmosphäre

AW: Perl-Skript wird nicht ausgeführt

In der Directory-Direktive schaltest Du alle Optionen aus. Mach mal:

Code:
<Directory "/opt/lampp/htdocs/cgi-bin">
    AllowOverride None
    Options +ExecCGI
    AddHandler cgi-script .pl .cgi
    Order allow,deny
    Allow from all
</Directory>
__________________
Perl-Zeitschrift

Perl-Community
  renee ist offline  
 
Alt 09.02.10, 22:02   #3 (permalink)
 
Benutzerbild von mille  
 
Registriert seit: Aug 2001
Ort: cottbus (brandenburg)
Beiträge: 809
Renommee-Modifikator: 21
mille hat eine blütenweiße Weste

AW: Perl-Skript wird nicht ausgeführt

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 .... symbiolab.de auch
  mille ist offline  
 
Alt 09.02.10, 23:09   #4 (permalink)
ich wisch hier durch
 
Registriert seit: Feb 2005
Ort: hinterm Mond gleich Links
Beiträge: 5.482
Renommee-Modifikator: 59
Dr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein ZweiterDr Dau ist berühmt wie kein Zweiter

AW: Perl-Skript wird nicht ausgeführt

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: 21.06.2009)
Zitat:
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)
  Dr Dau ist offline  
 
Alt 11.02.10, 11:00   #5 (permalink)
 
Benutzerbild von mille  
 
Registriert seit: Aug 2001
Ort: cottbus (brandenburg)
Beiträge: 809
Renommee-Modifikator: 21
mille hat eine blütenweiße Weste

AW: Perl-Skript wird nicht ausgeführt

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 .... symbiolab.de auch
  mille ist offline  
 
 
 
Lesezeichen:


Themen-Optionen
Ansicht
Ähnliche Themen
 
Thema Autor Forum Antworten Letzter Beitrag
Skript wird auf Shell ausgeführt, aber nicht als Cronjob Jörgi15 Linux & Unix 7 22.12.09 18:45
Verhindern dass komplettes Skript ausgeführt wird (header:location) Fabian Frank PHP 3 08.04.08 16:06
CSS wird nicht ausgeführt Zank CSS 7 04.01.07 17:14
SQL wird nicht ausgeführt Azi PHP 3 11.11.06 13:11
while wird nicht ausgeführt ICPUI PHP 2 18.01.06 18:06
» Tools
 
tutorials.de-Tools tutorial.de-Suchfeld tutorial.de-Widget tutorial.de-RSS-Feed tutorial.de-Banner
» Neue Links
 
Hits: 134
»
JHT's Planetary...
(Cinema 4D-Objekte)
Hits: 261
»
Tageslicht ohne GI
(Cinema 4D-Tutorials)
Hits: 149
»
Puzzle
(Cinema 4D-Tutorials)
Hits: 100
»
Lacreme
(Cinema 4D-Tutorials)
Hits: 190
»
Liquid Light
(Cinema 4D-Tutorials)
» Aktuelle Umfrage
 
Bist du mit der Geschwindigkeit der Tutorials.de-Website zufrieden?
Ja, es putzt mir glatt den Staub vom Bildschirm! - 79,79%
150 Stimmen
Nein, ich denke da muss noch nachgebessert werden... - 20,21%
38 Stimmen
Stimmen gesamt: 188
Du darfst bei dieser Umfrage nicht abstimmen.

 

Alle Zeitangaben in WEZ +1. Es ist jetzt 22:39 Uhr.


Powered by vBulletin® Version 3.8.5 (Deutsch) & vBadvanced CMPS v.3.2.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.5.0 RC2 ©2010, Crawlability, Inc.
Alle Rechte vorbehalten ©2000 - 2010 tutorials.de
Design by Mark, CSS by Maik & Sven Mintel
Seite generiert in 0,19451 Sekunden mit 26 queries