Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change 
notification.

The following page has been changed by noodl:
http://wiki.apache.org/httpd/CGI

The comment on the change is:
Explain removal

------------------------------------------------------------------------------
- I configured the apache2 web server to execute a Perl script from a 
designated directory with the following:
+ mcadoo, thank you for your contribution to this wiki, but this page can't 
stand.
  
+ Pointing out errors is rarely helpful and if one is to do so it must be in 
the context of otherwise helpful advice. All too often it has been found that 
producing examples of bad advice, however presented, leads to support questions 
regarding said advice.
- {{{
-     ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
-     <Directory "/var/www/cgi-bin/">
-                 Options ExecCGI -Indexes
-                 AddHandler cgi-script .cgi .pl
-     </Directory>
- }}}
- But every time I accessed the script through the web browser I was presented 
with a download dialog box.
- I examined the apache configuration and made all kinds of changes but nothing 
helped.
- Until I finally noticed the following:
  
- The original Perl script is as follows:
+ Moreover, the easy mistake of test/text is one we've all made and doesn't 
constitute a wiki page. Can you imagine actually finding this page, having made 
that mistake? This wiki's explanatory space is meager, hence this entry, but 
i'll be removing this page now.
  
- {{{
-     #!/usr/bin/perl
-     print "Content-type: test/plain\n\n";
-     print "It's working.\n";
- }}}
- The problem is that the second line has the word test in it when it should be 
"text"
- Changing the word test to text made everything work.
- 
- I found other questions regarding this same behavior.
- Since this was a frustrating problem I submit this tip in the hope that it 
will save someone some time 
- and frustration.
- 

Reply via email to