You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "S.A. Birl" <sb...@concept.temple.edu> on 2006/03/17 16:17:57 UTC

[users@httpd] Help: CGI not executing outside of /cgi-bin/

Apache 2.0.51  Solaris 9

Im trying to get 1 file, show.cgi, to execute outside of /cgi-bin/

show.cgi (PERL) resides under /foo/bar  For now show.cgi is just a
"Hi" program.

	#!/usr/bin/perl -T

	use strict;
	use warnings;

	printf("Content-Type: text/html\n\n");
	printf("hi");

owner: nobody     perms: 555   Executes fine from the commandline.


For most part I know what needs to be added to make this work, but Im
getting the source code on the screen, instead of the output.

Nothing in the error log; access log returns a 200.

I looked at http://httpd.apache.org/docs/2.0/howto/cgi.html to see if
I was missing anything.  Apparently not.



<Directory "/usr/local/apache/htdocs/foo/bar">
        AllowOverride Options
        Options +ExecCGI

        <IfModule mod_mine.c>
#               <Files "show.cgi">
                        AddHandler cgi-script .cgi
#               </Files>
        </IfModule>
</Directory>

Ive looked at the other directives for /foo and for /, but I cannot
see anything that would cause the source code to print out.  I dont
use .cgi extensions anywhere else on the web server.


What could I be forgetting?


Thanks
 Birl

Please do not CC me responses to my own posts.
I'll read the responses on the list.

Archives   http://mail-archives.apache.org/mod_mbox/httpd-users/

---------------------------------------------------------------------
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] Help: CGI not executing outside of /cgi-bin/

Posted by "S.A. Birl" <sb...@concept.temple.edu>.
On Mar 17, Evan Platt (nospam-evan@espphotography.com.ns) typed:

Evan:  At 07:17 AM 3/17/2006, you wrote:
Evan:
Evan:  >  For most part I know what needs to be added to make this work, but Im
Evan:  >  getting the source code on the screen, instead of the output.
Evan:  >
Evan:  >  Nothing in the error log; access log returns a 200.
Evan:
Evan:
Evan:  >  <SNIP>
Evan:
Evan:  >  Ive looked at the other directives for /foo and for /, but I cannot
Evan:  >  see anything that would cause the source code to print out.  I dont
Evan:  >  use .cgi extensions anywhere else on the web server.
Evan:  >
Evan:  >
Evan:  >  What could I be forgetting?
Evan:
Evan:  An AllowOverride None statement elsewhere is my guess...



I found 2 instances of that under
	<Directory / >
	<Directory /usr/local/apache/htdocs >

I commented out the AllowOverride on both, did stop/startssl, and
still have source-code.





Please do not CC me responses to my own posts.
I'll read the responses on the list.

Archives   http://mail-archives.apache.org/mod_mbox/httpd-users/


---------------------------------------------------------------------
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] Help: CGI not executing outside of /cgi-bin/

Posted by Evan Platt <ev...@espphotography.com>.
At 07:17 AM 3/17/2006, you wrote:

>For most part I know what needs to be added to make this work, but Im
>getting the source code on the screen, instead of the output.
>
>Nothing in the error log; access log returns a 200.


><SNIP>

>Ive looked at the other directives for /foo and for /, but I cannot
>see anything that would cause the source code to print out.  I dont
>use .cgi extensions anywhere else on the web server.
>
>
>What could I be forgetting?

An AllowOverride None statement elsewhere is my guess... 


---------------------------------------------------------------------
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] Help: CGI not executing outside of /cgi-bin/

Posted by Nick Kew <ni...@webthing.com>.
On Friday 17 March 2006 16:02, David Salisbury wrote:
> You might want to double check that "mod_mine"... is it really yours?

LOL!

More seriously, any <IfModule> is almost always a Bad Thing
(if you don't *know* you have a very precise use for it, then
don't use it).

-- 
Nick Kew

---------------------------------------------------------------------
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] Help: CGI not executing outside of /cgi-bin/

Posted by "S.A. Birl" <sb...@concept.temple.edu>.
On Mar 17, David Salisbury (nospam-salisbury@globe.gov.ns) typed:

David:  You might want to double check that "mod_mine"... is it really yours?
David:
David:  -Dave



LMAO!  I cant believe it (well actually I can)!  Once I corrected the
spelling to mod_mime, it worked!

Good eye!

---------------------------------------------------------------------
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] Help: CGI not executing outside of /cgi-bin/

Posted by David Salisbury <sa...@globe.gov>.
You might want to double check that "mod_mine"... is it really yours?

-Dave


----- Original Message ----- 
From: "S.A. Birl" <sb...@concept.temple.edu>
To: <us...@httpd.apache.org>
Sent: Friday, March 17, 2006 8:17 AM
Subject: [users@httpd] Help: CGI not executing outside of /cgi-bin/


> Apache 2.0.51  Solaris 9
> 
> Im trying to get 1 file, show.cgi, to execute outside of /cgi-bin/
> 
> show.cgi (PERL) resides under /foo/bar  For now show.cgi is just a
> "Hi" program.
> 
> #!/usr/bin/perl -T
> 
> use strict;
> use warnings;
> 
> printf("Content-Type: text/html\n\n");
> printf("hi");
> 
> owner: nobody     perms: 555   Executes fine from the commandline.
> 
> 
> For most part I know what needs to be added to make this work, but Im
> getting the source code on the screen, instead of the output.
> 
> Nothing in the error log; access log returns a 200.
> 
> I looked at http://httpd.apache.org/docs/2.0/howto/cgi.html to see if
> I was missing anything.  Apparently not.
> 
> 
> 
> <Directory "/usr/local/apache/htdocs/foo/bar">
>        AllowOverride Options
>        Options +ExecCGI
> 
>        <IfModule mod_mine.c>
> #               <Files "show.cgi">
>                        AddHandler cgi-script .cgi
> #               </Files>
>        </IfModule>
> </Directory>
> 
> Ive looked at the other directives for /foo and for /, but I cannot
> see anything that would cause the source code to print out.  I dont
> use .cgi extensions anywhere else on the web server.
> 
> 
> What could I be forgetting?
> 
> 
> Thanks
> Birl
> 
> Please do not CC me responses to my own posts.
> I'll read the responses on the list.
> 
> Archives   http://mail-archives.apache.org/mod_mbox/httpd-users/
> 
> ---------------------------------------------------------------------
> 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