You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by eric <fs...@centurytel.net> on 2002/12/07 13:30:51 UTC
[users@httpd] now no error log, but can not execute cgi program
it stick at same page when I hit the submit bottom,
what may cause my cgi program can not execute
(now no error log)
(access log)
[07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
hope te see your advancer's help again
sincere Eric
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by eric <fs...@centurytel.net>.
I already changed,
error log
[Sat Dec 07 08:54:20 2002] [error] [client 64.91.61.186] script not found or
unable to stat: C:/apache/ApacheGroup/cgi-bin/entrance.cgi, referer:
http://www.linuxspice.com/cgi-bin/entrance.cgi?cpu=239.95&motherboard=149.95
&cd=49.95&ram=99.95&monitor=199.95&MKS=39.95&nic=89.95&harddisk=200&name=&ea
ddress=&address=&city=&state=&Zip=&credit16=&credit8=&credit3=
Not Found
request URL /cgi-bin/entrance.cgi is not un the server
even I change the slash 's direction of C drive it still be the same error
please help again
ERic
----- Original Message -----
From: "Gary Turner" <kk...@sbcglobal.net>
To: <us...@httpd.apache.org>
Sent: Saturday, December 14, 2002 8:49 AM
Subject: Re: [users@httpd] now no error log, but can not execute cgi program
> eric wrote:
>
> >
> >----- Original Message -----
> >From: "Gary Turner" <kk...@sbcglobal.net>
> >
> >> eric wrote:
> >>
> >> >it stick at same page when I hit the submit bottom,
> >> >what may cause my cgi program can not execute
> >> >(now no error log)
> >> >(access log)
> >> >
> >> > [07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
> >>
> >> Please configure your mail agent to send plain text only.
> >yes
> :)
> >>
> >> If that log entry is in response to your "submit", look at your HTML.
> >
> >that did not help too much, I use C:/cgi-bin than than http, because http
> >was be substite as "Program Files" that contain space make it not work in
> >path call
> >
> The original page contains a form. No? In the form you have action and
> method attributes. This is all HTML. Check that it does what you mean
> it to.
>
> ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
> ^ ^
> Yeah, the quotes cover that, but it sucks. Why not make a directory
> like c:\usr\lib for your cgi apps, etc. That would be the default
> directory were you using *nix.
> --
> gt kk5st@sbcglobal.net
> If someone tells you---
> "I have a sense of humor, but that's not funny."
> ---they don't.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by eric <fs...@centurytel.net>.
Dear Gary:
Thanks your recent's help and effort , most of my problem is solved by
myself by searching the web
Regard and thanks again
www.linuxspice.com
linux pc for sale
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by Gary Turner <kk...@sbcglobal.net>.
eric wrote:
>I already did , but it NOT Found
>my server root and cgi-bin in hpptd.conf is
>
>ServerRoot "C:/apache/ApacheGroup"
Where is your document root?
>
>ScriptAlias /cgi-bin/ "C:/apache/ApacheGroup/cgi-bin/"
OK. I assume that you renamed these directories from
"Apache<space>Group"
>
>#
># "C:/apache/ApacheGroup/cgi-bin" should be changed to whatever your
>ScriptAliased
># CGI directory exists, if you have that configured.
>#
><Directory "C:/apache/ApacheGroup/cgi-bin">
> AllowOverride None
> Options +ExecCGI
> Order allow,deny
> Allow from all
></Directory>
>
>and index.html have action as:
><form REQUEST_METHOD=GET QUERY_STRING
>action="http://www.linuxspice.com/cgi-bin/entrance.cgi">
Bad syntax: should be <form action="/cgi-bin/entrance.cgi"
method="get">
The ScriptAlias "cgi-bin" replaces all but the filename. QUERY_STRING
is an internal server variable that's used in your script either
directly or through modules such as CGI.pm (used below).
Below is a working form/cgi combo. If you don't mess with your config,
and you have perl installed, it should work.
This is the html. Name it "mailer.html" and put it in your doc-root.
In your browser, call http://localhost/mailer.html (or use
http://127.0.0.1/mailer.html if your legacy os doesn't understand
hostnames.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Mailer form that calls a cgi script</title>
</head>
<body>
<h1>Name Your Mailer</h1>
<form action="/cgi-bin/mailer.pl" method="get">
<input type="radio" name="mailer" value="0">Outlook
<p><input type="radio" name="mailer" value="1">Outlook
Express</p>
<p><input type="radio" name="mailer" value="2">An Actual Sane
Mailer</p>
<p><input type="submit" value="send..."> <input type=
"reset" value="oops...></p>
</form>
<hr>
</body>
</html>
OK this is the perl script that the html form calls. Modify the
hash-bang to reflect the location of your perl. It might be a Good
Thing(tm) to go off-line, since script does *no* validation. Name this
"mailer.pl" and put it in your cgi-bin directory.
#!/usr/bin/perl -wT
use CGI qw(param);
use strict;
# The script is pretty much stolen from the O'Reilly books, "CGI
# Programming" by 3 guys with long names, and "Learning Perl" by 2
# other guys.
print <<END_of_header;
content-type: text/html
<html>
<head>
<title>What kind of mailer</title>
</head>
<body>
<h1>Sane or Unsane?</h1>
END_of_header
my $mua = param("mailer");
if( $mua == 2 ){
print "<p>AAh. You don't use virus vectors.</p>";}
elsif( $mua!=2 ){
print "<p>Get a sane mail agent!</p>";}
print <<All_done;
</body>
</html>
All_done
# End of script
These definitely work. Have fun.
--
gt kk5st@sbcglobal.net
If someone tells you---
"I have a sense of humor, but that's not funny."
---they don't.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by eric <fs...@centurytel.net>.
I already did , but it NOT Found
my server root and cgi-bin in hpptd.conf is
ServerRoot "C:/apache/ApacheGroup"
ScriptAlias /cgi-bin/ "C:/apache/ApacheGroup/cgi-bin/"
#
# "C:/apache/ApacheGroup/cgi-bin" should be changed to whatever your
ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/apache/ApacheGroup/cgi-bin">
AllowOverride None
Options +ExecCGI
Order allow,deny
Allow from all
</Directory>
and index.html have action as:
<form REQUEST_METHOD=GET QUERY_STRING
action="http://www.linuxspice.com/cgi-bin/entrance.cgi">
still not work, please hlep
ERic
----- Original Message -----
From: "Gary Turner" <kk...@sbcglobal.net>
To: <us...@httpd.apache.org>
Sent: Saturday, December 14, 2002 8:49 AM
Subject: Re: [users@httpd] now no error log, but can not execute cgi program
> eric wrote:
>
> >
> >----- Original Message -----
> >From: "Gary Turner" <kk...@sbcglobal.net>
> >
> >> eric wrote:
> >>
> >> >it stick at same page when I hit the submit bottom,
> >> >what may cause my cgi program can not execute
> >> >(now no error log)
> >> >(access log)
> >> >
> >> > [07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
> >>
> >> Please configure your mail agent to send plain text only.
> >yes
> :)
> >>
> >> If that log entry is in response to your "submit", look at your HTML.
> >
> >that did not help too much, I use C:/cgi-bin than than http, because http
> >was be substite as "Program Files" that contain space make it not work in
> >path call
> >
> The original page contains a form. No? In the form you have action and
> method attributes. This is all HTML. Check that it does what you mean
> it to.
>
> ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
> ^ ^
> Yeah, the quotes cover that, but it sucks. Why not make a directory
> like c:\usr\lib for your cgi apps, etc. That would be the default
> directory were you using *nix.
> --
> gt kk5st@sbcglobal.net
> If someone tells you---
> "I have a sense of humor, but that's not funny."
> ---they don't.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by Gary Turner <kk...@sbcglobal.net>.
eric wrote:
>
>----- Original Message -----
>From: "Gary Turner" <kk...@sbcglobal.net>
>
>> eric wrote:
>>
>> >it stick at same page when I hit the submit bottom,
>> >what may cause my cgi program can not execute
>> >(now no error log)
>> >(access log)
>> >
>> > [07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
>>
>> Please configure your mail agent to send plain text only.
>yes
:)
>>
>> If that log entry is in response to your "submit", look at your HTML.
>
>that did not help too much, I use C:/cgi-bin than than http, because http
>was be substite as "Program Files" that contain space make it not work in
>path call
>
The original page contains a form. No? In the form you have action and
method attributes. This is all HTML. Check that it does what you mean
it to.
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
^ ^
Yeah, the quotes cover that, but it sucks. Why not make a directory
like c:\usr\lib for your cgi apps, etc. That would be the default
directory were you using *nix.
--
gt kk5st@sbcglobal.net
If someone tells you---
"I have a sense of humor, but that's not funny."
---they don't.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by eric <fs...@centurytel.net>.
----- Original Message -----
From: "Gary Turner" <kk...@sbcglobal.net>
To: <us...@httpd.apache.org>; "eric" <fs...@centurytel.net>
Sent: Saturday, December 14, 2002 6:53 AM
Subject: Re: [users@httpd] now no error log, but can not execute cgi program
> eric wrote:
>
> >it stick at same page when I hit the submit bottom,
> >what may cause my cgi program can not execute
> >(now no error log)
> >(access log)
> >
> > [07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
>
> Please configure your mail agent to send plain text only.
yes
>
> If that log entry is in response to your "submit", look at your HTML.
that did not help too much, I use C:/cgi-bin than than http, because http
was be substite as "Program Files" that contain space make it not work in
path call
hope to see your deep thinking 's mature reponse
Eric
> --
> gt kk5st@sbcglobal.net
> If someone tells you---
> "I have a sense of humor, but that's not funny."
> ---they don't.
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] now no error log, but can not execute cgi program
Posted by Gary Turner <kk...@sbcglobal.net>.
eric wrote:
>it stick at same page when I hit the submit bottom,
>what may cause my cgi program can not execute
>(now no error log)
>(access log)
>
> [07/Dec/2002:05:27:02 -0700] "GET / HTTP/1.1" 200 5901
Please configure your mail agent to send plain text only.
If that log entry is in response to your "submit", look at your HTML.
--
gt kk5st@sbcglobal.net
If someone tells you---
"I have a sense of humor, but that's not funny."
---they don't.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org