Click to See Complete Forum and Search --> : Perl......
TiLT
Dec 5th, 2001, 09:48 PM
when i open the script...it ALWAYS shows the script in the page .. why?!?! im just beginning in perl....thanx...:D
progressive
Dec 6th, 2001, 05:44 AM
Are you runnin a webserver? If not then u need to be!
If you have a webserver then you need to make sure that:
you have a cgi-bin,
the cgi-bin is setup for perl scripts,
and the script is in the cgi-bin
if all of the above is done and it still doesn't work then post your code and ill take look at it for u
;)
scoutt
Dec 6th, 2001, 10:55 AM
you will also need the shebang line.
that is the line that is at the very top and looks somehting like this.
#!usr/bin/perl
that tells the browser where perl is located on the server.
also do like progressive says, your server has to support cgi.
JoshT
Dec 6th, 2001, 11:11 AM
Do you still need the shebang line under mod_perl? Since its not running under CGI, I don't see why you would need to tell the shell where the executable is, unless Apache uses it internally, maybe for the switches.
progressive
Dec 6th, 2001, 11:12 AM
yes you still need it!!
JoshT
Dec 6th, 2001, 12:49 PM
What purpose does it serve then?
scoutt
Dec 6th, 2001, 12:51 PM
Originally posted by JoshT
What purpose does it serve then?
you had it right the first time, it tells apache where perl is.
JoshT
Dec 6th, 2001, 12:53 PM
But by using mod_perl, shouldn't apache have that loaded into memory and using that instead - rather than the executable like you would with cgi?
flamewavetech
Dec 6th, 2001, 01:11 PM
on apache it comes with a demo cgi script in perl. when i goto the address it says there was a internal server error. why?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.