httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TD - Sales International Holland B.V." ...@salesint.com>
Subject Re: CGI-BIN & Perl scripts
Date Fri, 25 Jan 2002 14:51:07 GMT
On Friday 25 January 2002 15:38, you wrote:

Nope... that ain't it :-) shebang line works fine I can execute it using
./test.pl
or perl test.pl
both work fine

Thanks for the reply though, have a nice weekend.

> You don't need AddHandler as you suspect. Your Options None
> should be fine as well.
>
> When you run it from the command like do you just specify
> the file like
>
> ./test.pl
>
> letting it use the shebang line or are you invoking the
> script with perl like
>
> perl test.pl
>
> If you can't run it without specifying perl then your shebang
> line is pointing to the wrong place. Type
>
> which perl
>
> to find the right path to your perl interpreter. If this isn't
> the problem then I have no idea.
>
>
> -=- RuneImp
> ImpTech - Web Design, Hosting & Computer Tech
> http://imptech.net
> rune@imptech.net
>
>
> ----- Original Message -----
> From: "TD - Sales International Holland B.V." <td@salesint.com>
> To: <users@httpd.apache.org>
> Sent: Friday, January 25, 2002 5:30 AM
> Subject: Re: CGI-BIN & Perl scripts
>
>
> On Friday 25 January 2002 13:34, you wrote:
>
> thanks :-) but I made that mistake typing it into my email editor, they are
> in the file. I know it's correct since if I run (on the command prompt)
> ./test.pl I get:
> Content-Type: text/html
>
> <HTML><BODY>bla bla</BODY></HTML>
>
> any ideas?
> +ExecCGI didn't help either. Perhaps I need something like AddHandler, but
> I'm not too sure about that. I configured it from scratch this time but on
> some of my other puters with a default apache install (from distro) it
> doesn't matter which extension I give my files as long as I chmod +x em.
> Besides, if I'm not mistaken, if I use AddHandler I'll be in trouble
> because the .pl files will then be executed wherever they are right? Not
> just in the cgi-bin dir, which is what I want. Doing this from scratch so I
> have a better understanding of the server and it's security implications.
>
> I disabled some modules perhaps that's it but I don't think so.
> These are the enabled!! modules:
>
> env
> log_config
> mime
> negotiation
> status
> autoindex
> dir
> alias
> access
> auth
> so
> php4 (DSO)
> ssl (compiled in, not DSO thus)
>
> disabled modules:
>
> include
> asis
> imap
> actions
> rewrite (DSO)
>
> All other modules are NOT compiled. I disabled the above ones because I
> have no need for them.
>
> Kind regards
>
> > Your missing a quote & a semicolon. It should be
> >
> > #!/usr/bin/perl
> > print "Content-type: text/html\n\n";
> > print "<HTML><BODY>bla bla</BODY></HTML>";
> >
> >
> > -=- RuneImp
> > ImpTech - Web Design, Hosting & Computer Tech
> > http://imptech.net
> > rune@imptech.net
> >
> >
> > ----- Original Message -----
> > From: "TD - Sales International Holland B.V." <td@salesint.com>
> > To: <users@httpd.apache.org>
> > Sent: Friday, January 25, 2002 4:21 AM
> > Subject: CGI-BIN & Perl scripts
> >
> >
> > Hey there,
> >
> > I made a simple perl script like this:
> > #!/usr/bin/perl
> > print "Content-type: text/html\n\n";
> > print "<HTML><BODY>bla bla</BODY></HTML>
> >
> > file is name test.pl, permissions
> > -rwxr-xr-x root, root, other
> > ./test.pl works as expected
> > in httpd.conf:
> > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
> >
> > <Directory "/var/www/cgi-bin">
> >   AllowOverride None
> >   Options None
> >   Order Allow,Deny
> >   Allow from all
> > </Directory>
> >
> > when going to
> > http://myserver/cgi-bin/test.pl
> > I just get the contents of the file, also html files can be served from
> > the directory (although it doesn't recognize index files
> > (myserver.tld/cgi-bin/index.html will show the index file but
> > myserver.tld/cgi-bin/ will give no such file or directory). I was under
> > the assumption anything in a scriptalias directory would be executed but
> > it doesn't look like it....
> >
> > Any ideas?
> >
> > Kind regards
> >
> > ---------------------------------------------------------------------
> > 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
> > 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
> > 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
> 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
> 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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message