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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



syvers
Deleted

May 27, 2001, 5:23 AM

Post #1 of 3 (1282 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
Paul



Replies:




sigma
stranger

May 29, 2001, 3:49 AM

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

You probably don't know what

Code
 command line

is.

Code
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 (

Code
command line

) and then type

Code
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...


AICapone
Deleted

May 29, 2001, 10:37 AM

Post #3 of 3 (1263 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
#!perl
without any kind of slashes or whatewver. Make sure that you did not put
#!C:\perl\bin\perl.exe
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