Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie question on cgi and apache

Status
Not open for further replies.

reb37

Programmer
Apr 3, 2001
10
US
Hi,
This is kind of an embarassing question. I'm using the "learn cgi in 24hours" book to get started with some basic cgi scripting. The book recommends using apache as a test environment, which I've downloaded and installed. According to the book, the server is working correctly b/c I get their welcome message when I type in localhost. However, the test script isn't working, either in the browser or from the command line to test it. I think the reason is that I'm not sure how to put in the first line indicating where perl resides on my pc. Do I say c:/perl/bin? or what??? Everybody says use #!/usr/local/bin/perl but that isn't working for me b/c that's not where perl is. HELP! I know this is really basic but I'd really appreciate your help. I'm using ActiveState Active Perl, Apache 1.3.19(win32) and Win2000pro on a ThinkPad. The error message I get in the browser is "the page cannot be displayed." In dos I get "no such file or directory for the command c:\perl\bin\perl.exe c:\apache\cgi-bin\test.cgi." Also, Is there something I'm supposed to be doing with the apache server to set it up? There doesn't seem to be any kind of console or anything that I can do with it. My book doesn't say anything either. Also, I'm not sure I didn't mess up the config file b/c I set it to open in Word. Is that okay? I really don't know what I'm looking for in terms of editing something. If anyone can steer me in the right direction I'd really appreciate it!


 
Hey I'm learning CGI from the exact same book and I'm having the same problems you are. The only difference is that I'm on a desktop running win98. The apache site is of no use to me because it isn't written in laymans terms, their help is written as if you already know how to administer their server.. and I don't. My goal isn't to learn how either so I'm very frustrated. I did read the conf files that came with apache and according to them the shabang line for perl on drive C is #!c:/perl/bin/perl
or if your perl interp is installed in program files it would be #!C:/program files/perl/bin/perl, this line can not be indented and must be followed by 2 blank lines. Meanwhile I still can't get my CGI's to execute with apache, even after changing the directives in the configuration file.
 
Hi Femme,

You know, I decided that this guy was just sending me off on a tangent I didn't necessarily need to go on, so I'm using my friend's server. He's running Linux and he knows alot about perl and cgi so he's a great resource too. I also bought "Perl and CGI for the World Wide Web: Visual QuickStart Guide" by Elizabeth Castro because all the reviews on amazon.com said that it was written for beginners which I definitely am! So I'm going to ditch apache for now and move on. Good luck! Maybe your isp can hook you up with some scripts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top