I am having a problem that I assume is a set-up problem but I don't know which area to look at to fix it. Hopefully someone here can point me in the right direction. I can't get the simple Perl "Hello World" script to work. Oh, it does print "Hello World" OK but it also prints the "Content" line as text rather than using it as a directive. Two different servers (both CentOs 5) and both IE and Firefox are doing the same thing. I first tried a JavaScript program (free online shopping cart) and it wouldn't work properly. So, I changed to CGI and can't get it working OK either. What does work: CGI/Perl visitor count program. Count.log and main.log exist and get updated and display the updated count in the browser OK. What doesn't work: "content" line is seen as text. I can't create a file using CGI. I can append to one but I can't create one. I have tried a CGI shopping cart (Commerce) which has an install script. It displays the first page OK but when I click on "Continue" I get the same page again. The script says clicking on "Continue" should submit a form (Post) with a name of "step2. An IF statement should see that name and go to the step2 subroutine. It doesn't. It falls through to the ELSE and displays the same page. A Print command shows the name is blank after the click. The browser knows about the form because a refresh tells me about the stale form data. I have the AddHandler lines and the ExCGI option in my http config. I have checked that all spelling and cases are OK. Carp Fatal to Browser is not showing any errors. Server error log doesn't seem unhappy either. I have done some searching in news groups and Deja, ooops sorry, Google and didn't find anything that helped. Where do I look next?
Tech wrote on Mon, 29 Sep 2008 13:01:26 +0800:> Oh, it does print "Hello World" OK but it also prints the "Content" line > as text rather than using it as a directive.This is not a setup problem and not a CentOS problem. Your script is probably wrong in some code. I assume with "Content" line you might mean an HTTP header. There is no such header (there are headers starting with this string, though). I think your question is better suited for a Perl or CGI programming newsgroup. Kai -- Kai Sch?tzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com
On Mon, Sep 29, 2008 at 12:01 AM, tech <tech at laamail.com> wrote:> I am having a problem that I assume is a set-up problem but I don't know > which area to look at to fix it. Hopefully someone here can point me in the > right direction. > > I can't get the simple Perl "Hello World" script to work.I can't get the "Hello World" program in the C++ book I began reading to work. Seems to compile without errors, but nothing on my CRT. Will try it again and start a thread here... :-)