Toon posts:

Which Perl - Cgi problemen

Pagina: 1
Acties:

Verwijderd

Topicstarter
Apache/2.0.43 Server
Als ik het commando which perl intik krijg ik het volgende:

[root@server apache]# which perl
/usr/local/bin/perl

Ik heb in Apache het pad script goed staan, maar voor de zekerheid hier een stukje
zetten:
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname 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/ "/services/apache/cgi-bin/"

<IfModule mod_cgid.c>
#
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# for setting UNIX socket for communicating with cgid.
#
Scriptsock logs/cgisock
</IfModule>

#
# "/services/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/services/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

Ik heb net ook nog extra Perl 5.8.0 geinstalleerd, maar krijg elke keer de 500 Error

In de error log files vindt ik dit:

Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
Premature end of script headers: test.cgi
test.cgi: ":fatalsToBrowser" is not exported by$
test.cgi: Can't continue after import errors at$
test.cgi: BEGIN failed--compilation aborted at $
Premature end of script headers: test.cgi
test.cgi: ":fatalsToBrowser" is not exported by$
test.cgi: Can't continue after import errors at$
test.cgi: BEGIN failed--compilation aborted at $
Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$

Nu de Vraag???

WAT DOE IK FOUT? HELP

Verwijderd

Topicstarter
Het probleem is dus dat ik geen scripten kan draaien, rechten maskers staan goed, van zowel de cgi-bin als van de script (755)

de map /usr/local/bin/perl bestaat
ook /usr/local/bin/perl5.8.0 bestaatt

in de scripts heb ik zowel !/usr/local/bin/perl als perl5.8.0 geprobeerd


Dit is de error dus
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@local and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

  • odysseus
  • Registratie: Augustus 2000
  • Laatst online: 19:28

odysseus

Debian GNU/Linux Sid

Het lijkt erop dat je script niet goed is en dat de fout niet bij de server ligt. Kun je je script eens posten, of in ieder geval het eerste deel ervan? Ook lijken de regels van je log afgekapt: alle locaties staan er niet bij :).

Leven is het meervoud van lef | In order to make an apple pie from scratch, you must first create the universe.


Verwijderd

Topicstarter
!/usr/local/bin/perl
#########################################################
# A Postcard Program #
# Written by Jason W. Maloney - December 20, 1998 #
# Updated - February 22, 2001 #
# #
# This script is very easy to set-up, even for those #
# just starting out with CGI. It shouldn't take longer #
# than 10 minutes to get it up and running. It has been #
# tested on UNIX & NT and no problems were discovered. #
# #
# The use of templates make it very easy to customize #
# the postcard script to your needs. #
# #
# MAKE SURE THAT YOU READ OVER THE TERMS OF AGREEMENT #
# BEFORE USING THIS SCRIPT. BY USING THIS SCRIPT, #
# YOU ARE AGREEING TO ABIDE BY THEM. HOWEVER, IF YOU #
# DON'T AGREE WITH IT, THEN DON'T USE MY SCRIPTS. ALSO, #
# PLEASE READ THE 'README.TXT' FILE BEFORE INSTALLING. #
# KEEP IN MIND THAT JASON'S SCRIPTS & THE AESTHETIC #
# SURGERY CENTER SHALL NOT BE HELD LIABLE FOR ANY #
# DAMAGES THAT MAY OCCUR FROM DOWNLOADING AND/OR #
# INSTALLING MY PROGRAMS. IN SHORT, DOWNLOAD AND USE MY #
# PROGRAMS AT YOUR OWN RISK! IF YOU DO NOT AGREE WITH #
# THIS, THEN DO NOT USE ANY OF MY PROGRAMS. #
# #
###########################################################
###########################################################
$domain_name = "psy-c.nl";
$location = "http://www.psy-c.nl/postcard";
$basepicurl = "http://www.psy-c.nl/postcard/pictures/";
$cgi = "http://www.psy-c.nl/cgi-bin/card.cgi";
$cards = "$ENV{DOCUMENT_ROOT}/postcard/cards/";
$basepicdir = "$ENV{DOCUMENT_ROOT}/postcard/pictures/";
$preview1 = "$ENV{DOCUMENT_ROOT}/postcard/preview1.html";
$preview2 = "$ENV{DOCUMENT_ROOT}/postcard/preview2.html";
$makecard = "$ENV{DOCUMENT_ROOT}/postcard/makecard.html";
$thank_you = "$ENV{DOCUMENT_ROOT}/postcard/thankyou.html";
$error = "$ENV{DOCUMENT_ROOT}/postcard/error.html";
$email1 = "$ENV{DOCUMENT_ROOT}/postcard/email1.txt";
$email2 = "$ENV{DOCUMENT_ROOT}/postcard/email2.txt";
$mailprog = '/usr/lib/sendmail';
$MAX_DAYS = '30';

  • odysseus
  • Registratie: Augustus 2000
  • Laatst online: 19:28

odysseus

Debian GNU/Linux Sid

De eerste regel moet in ieder geval al '!#/usr/local/bin/perl' zijn (zonder aanhalingstekens) :).

Leven is het meervoud van lef | In order to make an apple pie from scratch, you must first create the universe.


Verwijderd

Topicstarter
Oke, nu heb ik het zo

#!/usr/local/bin/perl
########################################################


Nog steeds:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@psy-c.nl and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Complete error-log file hieronder

[Wed Feb 19 20:40:13 2003] [error] [client 213.84.9.105] File does not exist: /www/psy-c.nl/html/cgi-bin
[Wed Feb 19 20:40:16 2003] [error] [client 213.84.9.105] attempt to invoke directory as script: /services/apache/cgi-bin/
[Wed Feb 19 20:41:44 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi
[Wed Feb 19 20:44:40 2003] [error] [client 213.84.9.107] Premature end of script headers: card.cgi
[Wed Feb 19 20:48:50 2003] [error] [client 213.84.9.105] attempt to invoke directory as script: /services/apache/cgi-bin/
[Wed Feb 19 20:48:52 2003] [error] [client 213.84.9.105] attempt to invoke directory as script: /services/apache/cgi-bin/
[Wed Feb 19 20:49:00 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 20:50:28 2003] [error] [client 62.251.82.2] Premature end of script headers: card.cgi
[Wed Feb 19 20:50:28 2003] [error] [client 62.251.82.2] File does not exist: /www/psy-c.nl/html/favicon.ico
[Wed Feb 19 20:51:22 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 20:56:36 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 20:57:30 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:00:28 2003] [error] [client 62.163.21.47] Premature end of script headers: card.cgi
[Wed Feb 19 21:01:39 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:02:00 2003] [error] [client 213.84.9.105] File does not exist: /www/psy-c.nl/html/favicon.ico
[Wed Feb 19 21:02:00 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi
[Wed Feb 19 21:05:46 2003] [error] [client 212.127.160.53] File does not exist: /www/psy-c.nl/html/cu3
[Wed Feb 19 21:14:39 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:15:00 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:16:56 2003] [error] [client 213.84.9.105] Premature end of script headers: test.cgi
[Wed Feb 19 21:16:56 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:16:56 2003] test.cgi: ":fatalsToBrowser" is not exported by$
[Wed Feb 19 21:16:56 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:16:56 2003] test.cgi: Can't continue after import errors at$
[Wed Feb 19 21:16:56 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:16:56 2003] test.cgi: BEGIN failed--compilation aborted at $
[Wed Feb 19 21:20:35 2003] [error] [client 213.84.9.105] Premature end of script headers: test.cgi
[Wed Feb 19 21:20:35 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:20:35 2003] test.cgi: ":fatalsToBrowser" is not exported by$
[Wed Feb 19 21:20:35 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:20:35 2003] test.cgi: Can't continue after import errors at$
[Wed Feb 19 21:20:35 2003] [error] [client 213.84.9.105] [Wed Feb 19 21:20:35 2003] test.cgi: BEGIN failed--compilation aborted at $
[Wed Feb 19 21:24:20 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:33:27 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:34:52 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:37:13 2003] [error] [client 62.100.61.200] File does not exist: /www/psy-c.nl/html/cu3, referer: http://www.cu2.nl/b$
[Wed Feb 19 21:44:03 2003] [error] [client 62.100.61.200] File does not exist: /www/psy-c.nl/html/cu3, referer: http://www.cu2.nl/b$
[Wed Feb 19 21:49:24 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:54:06 2003] [error] [client 213.84.9.105] Premature end of script headers: card.cgi, referer: http://www.psy-c.nl/po$
[Wed Feb 19 21:54:06 2003] [error] [client 213.84.9.105] Can't locate http://www.psy-c.nl/cgi-bin/program.cgi in @INC (@INC contain$

Verwijderd

Topicstarter
Ik heb vannacht zelf nog zitten puzzelen hieraan, maar ik kom er absoluut niet uit. Ik hoop echt dat 1 van jullie de oplossing heeft voor me |:(

Verwijderd

Topicstarter
Is er dan niemand :P

  • we_are_borg
  • Registratie: September 2000
  • Laatst online: 25-03 16:34

we_are_borg

You will Comply

Probeer eerst eens dit script aan de gang te krijgen. Is een zeer simple script deze laat ook gelijk allle informatie zien die je nodig mocht hebben voor perl. Als hij niet draait dan is er meestal wat aan de hand aan je providers kant. De rechten voor het script is uit mijn hoofd 755.

p.s. Topic kicken binnen 24 uur wordt geloof ik niet op prijs gestelt door de mods e.d.

You need the computing power of a P1, 16 MB RAM and 1 GB Harddisk to run Win95. It took the computing power of 3 Commodore 64 to fly to the Moon. Something is wrong here, and it wasn't the Apollo.


Verwijderd

Topicstarter
Thx... Alles werkt :D
Pagina: 1