*.pl - *.cgi

Status
Niet open voor verdere reacties.

BugMenOT2

Gebruiker
Lid geworden
23 nov 2006
Berichten
296
Hallo,

Ik heb "ActivePerl-5.8.8.820-MSWin32-x86-274739.MSI" geinstalleerd.

Dit werkt OK.

Maar als ik nu een *.pl of een *.cgi maak , waar moet ik dan mijn bestanden plaatsen voor te kunnen uitvoeren in de browser ?

Heb al vanalles geprobeerd maar ik kom er niet uit.

Ik heb wel mijn WWW op een andere harde schijf staan.

Heb op mijn C:\ schijf :

- c:\server/ #hier is Apache geinstalleerd
- c:\server/PHP #hier is PHP geinstalleerd
- c:\server/MySQL #hier is MySQL geinstalleerd
- c:\server/Perl #hier is Perl geinstalleerd

En heb dus op mijn D:\ schijf :

- d:\wwwNet

PS: Windows XP

Dit is zo een scriptje

Code:
#!/usr/bin/perl -T

use CGI qw/:standard -no_xhtml/;        # load standard CGI routines

print header(),                         # create the HTTP header
      start_html('Hello World demo'),   # start the HTML
      p('Hello, World.'),
      end_html();                       # end the HTML

#end of script

Zou iemand me hierbij kunnen helpen ?

Groetjes,
Benny
 
ga naar de apache map klik op cgi-bin plaats je bestand hier in.
en ga naar localhost/cgi-bin/<scriptnaam>
je kunt deze locatie aanpassen in de httpd.conf van apache
 
In "httpd.conf" heb ik " #!C:/program files/perl/perl " verandert in " #!C:/server/Perl/bin "

Code:
# 
# 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:/server/Perl/bin

En natuurlijk in het scriptje ook de juiste verwijzing :D

#!C:/server/Perl/bin/perl.exe

Wel bedankt voor de hulp dat je me gegeven hebt. :thumb:

Alles werkt!

groetjes,
Benny
 
Laatst bewerkt:
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan