Homepage selbermachen 7.846 Themen, 35.563 Beiträge

CGI-Script konfigurieren

Selter / 2 Antworten / Flachansicht Nickles

Bitte helft mir - ich bin am verzweifeln .....
ich habe stundenlang eine Online-umfrage programmiert und nun klappt das CGI-Script zum absenden der Daten nicht.

Ich verwende das alienform.cgi script (http://cgi.tj/scripts/alienform )

Meine HTML-Dateien liegen unter
http://www2.hs-harz.de/~xxxxxx/fragebogen.html

Das Script wird auch aufgerufen, nur bekomme ich immer diese fehlermeldung:

File Access Error
An error occurred when opening the Error Template (/templates/error.txt): No such file or directory.

Die Datei ist allerdings vorhanden

Kann mir jemand helfen
Danke Selter

bei Antwort benachrichtigen
Selter Zaphod „... hat das Script auch Lese- und Schreibrechte für diese Datei? Have fun, Z.“
Optionen

Wie meinst Du das?
Das CGI-Script habe ich auf CHMOD 755 und die Templates auf 644 gesetzt - so steht es in der Anleitung...

Vermute, daß irgendetwas mit den Pfadangaben nicht stimmt - die Fehlermeldung bedeutet doch, daß er "kein solches File/Directory finden kann" - nur wie lege ich den korrekten Pfad fest???
Habe mal die Anleitung reinkopiert (insbes. Punkt 4) ... vielleicht hast Du einen Tip???

Vielen Dank



1) When you open up the script, please make sure your word processor does not insert any work wraps! The script should be 331 lines long exactly.
2) Set the first line of the script, the shebang, to the path to your Perl 5 binaries (Perl 4 doesn't cut it, check which version you're using!).
3) Set $content_type to the MIME type you want sent to the browser. Unless you have good reason not to, use $content_type = "Content-Type: text/html\n\n";
4) Set $base_path to the base path of your templates. The files specified in the HTML and log templates will be appended to this to make the real file name. This should not be a URL, but a real file path; either absolute, or relative to the script: /home/user/www/alienform, or ./ might be correct, but http://www.site.com/cgi-bin/alienform/ is right out.
5) Set $mail_cmd to the command to send mail on your system. The mailer must be able to accept the message headers and body via STDIN. E.g. $mail_cmd = '/usr/sbin/sendmail';
6) Set $mail_flags to the flags to send to your mailer. 'oi -t' works well for instant delivery (might slow down the script), or '-oi -t -odq' to queue the mail for delievery in the next run (generally every ten minutes, but the script will finish faster.)
7) If you wish to use SMTP (network delivery) instead of a command line mailer, set $smtp_server to the hostname of the mail server. You will need Mail::Sendmail for this to work.
8) Set @Referers to the list of Valid Referers- i.e. those sites & pages you want to be able to use the script. All others will be denied access. You can be very specific so only one page has access, or general so a whole site can use it. To allow any site at all to use the form, comment out this value entirely.

bei Antwort benachrichtigen