|
List Info
Thread: apache-2.2.4-r6
|
|
| apache-2.2.4-r6 |

|
2007-06-08 03:09:21 |
It seems to me that when I setup .cgi and .pl via an
addhandler
statement such as:
AddHandler cgi-script .cgi .pl
apache will try to execute anything containing .pl or .cgi.
If i have a file, foo.pl for example.
http://localhost/foo.pl
will execute (good)
now if I move it to foo.txt
http://localhost/foo.txt
will show me the contents of the file (good)
now if I move it to foo.pl.txt
http://localhost/foo.pl.t
xt will try to execute it, as it will if i
canme it foo.cgi.txt.
calling it foo.php.txt will still print it out, but the new
lines are
stripped etc, it looks like it's been run through and spat
out php.
Is this intended behaviour? It kind of seems like something
gone wrong.
Thanks,
Korth
--
() The ASCII Ribbon Campaign - against HTML Email,
/ vCards, and proprietary formats.
--
gentoo-server gentoo.org mailing list
|
|
| Re: apache-2.2.4-r6 |
  Switzerland |
2007-06-08 03:57:25 |
Korthrun wrote:
> It seems to me that when I setup .cgi and .pl via an
addhandler
> statement such as:
>
> AddHandler cgi-script .cgi .pl
>
> apache will try to execute anything containing .pl or
.cgi.
>
> If i have a file, foo.pl for example.
> http://localhost/foo.pl
will execute (good)
> now if I move it to foo.txt
> http://localhost/foo.txt
will show me the contents of the file (good)
> now if I move it to foo.pl.txt
> http://localhost/foo.pl.t
xt will try to execute it, as it will if i
> canme it foo.cgi.txt.
> calling it foo.php.txt will still print it out, but the
new lines are
> stripped etc, it looks like it's been run through and
spat out php.
>
> Is this intended behaviour? It kind of seems like
something gone wrong.
Yup, it is intended, check the doc:
http://httpd.apache.org/docs/2.2/mod/mod_mime.html#
addhandler
"Once that has been put into your httpd.conf file, any
file containing
the .cgi extension will be treated as a CGI program."
The keyword here is "containing", not "ending
with", which may be
surprising, but it is so.
--
Best regards,
Luca Longinotti aka CHTEKK
LongiTEKK Networks Admin: chtekk longitekk.com
Gentoo Dev: chtekk gentoo.org
SysCP Dev: chtekk syscp.org
TILUG Supporter: chtekk tilug.ch
--
gentoo-server gentoo.org mailing list
|
|
| Re: apache-2.2.4-r6 |
  Australia |
2007-06-08 07:58:21 |
On Fri, 08 Jun 2007 10:57:25 +0200
Luca Longinotti <chtekk gentoo.org> wrote:
> Korthrun wrote:
> > It seems to me that when I setup .cgi and .pl via
an addhandler
> > statement such as:
> >
> > AddHandler cgi-script .cgi .pl
> >
> > apache will try to execute anything containing .pl
or .cgi.
> >
> > If i have a file, foo.pl for example.
> > http://localhost/foo.pl
will execute (good)
> > now if I move it to foo.txt
> > http://localhost/foo.txt
will show me the contents of the file
> > (good) now if I move it to foo.pl.txt
> > http://localhost/foo.pl.t
xt will try to execute it, as it will if i
> > canme it foo.cgi.txt.
> > calling it foo.php.txt will still print it out,
but the new lines
> > are stripped etc, it looks like it's been run
through and spat out
> > php.
> >
> > Is this intended behaviour? It kind of seems like
something gone
> > wrong.
>
> Yup, it is intended, check the doc:
>
> http://httpd.apache.org/docs/2.2/mod/mod_mime.html#
addhandler
>
> "Once that has been put into your httpd.conf file,
any file containing
> the .cgi extension will be treated as a CGI
program."
>
> The keyword here is "containing", not
"ending with", which may be
> surprising, but it is so.
I think AddType is what you're after.
Cheers,
Brad
|
|
| Re: apache-2.2.4-r6 |

|
2007-06-08 13:38:20 |
On 6/8/07, Brad Plant <bplant iinet.net.au> wrote:
> On Fri, 08 Jun 2007 10:57:25 +0200
> Luca Longinotti <chtekk gentoo.org> wrote:
>
> > Korthrun wrote:
> > > It seems to me that when I setup .cgi and .pl
via an addhandler
> > > statement such as:
> > >
> > > AddHandler cgi-script .cgi .pl
> > >
> > > apache will try to execute anything
containing .pl or .cgi.
> > >
> > > If i have a file, foo.pl for example.
> > > http://localhost/foo.pl
will execute (good)
> > > now if I move it to foo.txt
> > > http://localhost/foo.txt
will show me the contents of the file
> > > (good) now if I move it to foo.pl.txt
> > > http://localhost/foo.pl.t
xt will try to execute it, as it will if i
> > > canme it foo.cgi.txt.
> > > calling it foo.php.txt will still print it
out, but the new lines
> > > are stripped etc, it looks like it's been run
through and spat out
> > > php.
> > >
> > > Is this intended behaviour? It kind of seems
like something gone
> > > wrong.
> >
> > Yup, it is intended, check the doc:
> >
> > http://httpd.apache.org/docs/2.2/mod/mod_mime.html#
addhandler
> >
> > "Once that has been put into your httpd.conf
file, any file containing
> > the .cgi extension will be treated as a CGI
program."
> >
> > The keyword here is "containing", not
"ending with", which may be
> > surprising, but it is so.
>
> I think AddType is what you're after.
>
> Cheers,
>
> Brad
>
>
It seems so. Thanks for that.
No clue how I missed this last night:
http://httpd.apache.org/docs/2.2/mod/mod_mime.html
#multipleext
I always associated an extention with the end of the file
name, but
that's kind of silly when you think about it.
--
() The ASCII Ribbon Campaign - against HTML Email,
/ vCards, and proprietary formats.
--
gentoo-server gentoo.org mailing list
|
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|