CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
Apache/Perl Interpretter



May 27, 2001, 5:23 AM

Post #1 of 3 (1408 views)
Apache/Perl Interpretter Can't Post

I have downloaded the Apache Server for windows and I have also downloaded the Perl Interpretter software.
I am currently working through SAMMS teach yourself CGI and have coded a test page. The test page runs perfectly well in a web browser (IE5).
However, under a heading (in the book) "What if Something Went Wrong" I am told to run the Perl Interpretter and input the following in the command line
C:\perl\bin\perl.exe C:\apache\cgi-bin\test.cgi
and it should produce some output beginning
Content - Type........
Instead i get the error message "Backslash Found Where Operator Expected at Line 1 - near perl/". And this continues for each word with a "/" at the end.

Am i doing something wrong when typing this in or have i not completed the configuration? The paths I have typed in are correct i am 100% sure.
Thanks you



May 29, 2001, 3:49 AM

Post #2 of 3 (1396 views)
Re: Apache/Perl Interpretter [In reply to] Can't Post

You probably don't know what

 command line


command line

is what you get, when you run "MSDOS prompt" shortcut in windoze. Just remove the line You've wrote at the begin and try again.
Or run msdos prompt (

command line

) and then type

C:\perl\bin\perl.exe C:\apache\cgi-bin\test.cgi


You can also create .bat file and that line write into that file.
[p align="right"](Have You tryied Linux?)[/p]

driven by perl...


May 29, 2001, 10:37 AM

Post #3 of 3 (1389 views)
Re: Apache/Perl Interpretter [In reply to] Can't Post

well since you're getting problem in line 1, I am thinking that your perl address isn't right. In windows, perl exec is given by
without any kind of slashes or whatewver. Make sure that you did not put
becuase I don't think this would work.
Also, open httpd.conf with notepad (it's in C:\apache\conf\), fing the fillowing line and uncomment it:
# ScriptInterpreterSource registry
make ir
ScriptInterpreterSource registry
so you won't have to think about your exec line in perl scripts. Apache will look through registry to find perl

Another thing you could try:
go to msdos prompt, and type
perl C:\apache\cgi-bin\test.cgi
I am not sure if it works with .cgi files, but if it was .pl you'd run the script.
At least that's how it was on my computer :())))
P.S. I personally work with .pl files when code in Perl, not .cgi I dunno why, dut it makes me feel safer :)

What is difficlut takes time, what is impossible takes a little longer


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives