You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Charlton Harrison <ch...@dynet.com> on 2005/05/04 21:00:28 UTC
[users@httpd] Stuck - bug#8431
Hi Everyone,
I've been stuck on this problem for some time:
http://issues.apache.org/bugzilla/show_bug.cgi?id=8431
After reading the bug report, it states that the problem is fixed in
apache 2.1 (by adding the "virtual" option to the Action directive),
but I still am unable to figure out what to do to about Actions and
AddHandlers on virtual (i.e. non-existant) files under apache 2.0.X.
I am still stuck.
What I'm trying to do is accept request for files that end in mp3 or ogg,
as well as filenames such as "xxxxxx.mp3.ogg" to be handled by my
reencode.cgi script which knows from the extension whether or not to
cat the original file or, in the case of "xxxxxx.mp3.ogg" take the original
(existing) xxxxxx.mp3 file and reencode it to ogg vorbis (at a lower bitrate,
for example).
One possible solution mentioned in the bug report that I was unable to get
to work was to use ScriptAliasMatch, such as in the following scenario:
ScriptAliasMatch "\.(ogg|mp3)$" /cgi-bin/reencode.cgi
I was unable to get this to work. Everything used to work fine under
apache 1.3 by doing:
AddHandler music_file .mp3 .ogg
Action music_file /cgi-bin/reencode.cgi
But alas, I get a 404 error on files such as "xxxxxx.mp3.ogg" since it
does not map to an actual existing file.
Could someone please suggest a possible solution for apache 2.0.X?
It'd also be good to add this solution to the bug report and documentation.
Charlton
---------------------------------------------------------------------
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
[users@httpd] Stuck - bug#8431
Posted by Joshua Slive <js...@gmail.com>.
On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> On Wed, May 04, 2005 at 03:52:51PM -0400, Joshua Slive wrote:
> > On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > > ScriptAliasMatch "\.(ogg|mp3)$" /cgi-bin/reencode.cgi
> >
> > Try:
> > ScriptAliasMatch "\.(ogg|mp3)$" /usr/local/apache2/cgi-bin/reencode.cgi
> > (or wherever your cgi-bin directory is located).
>
> Nope doesn't work. Gives me a 403 - forbidden error.
> I'm currently working on figuring out what's going on here.
> All the file & directory permissions are good...
This is the third time I've said this in the last 10 minutes:
Look in the apache error log.
Joshua.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Charlton Harrison <ch...@dynet.com>.
On Wed, May 04, 2005 at 06:35:22PM -0400, Joshua Slive wrote:
> I'm annoyed for two reasons:
>
> 1. You're whining about something not getting done in an open-source
> project that you are getting for free. If you want it done, hire
> someone to do it for you.
I think it's not a question of getting it done, because I'm sure
simply adding the 'virtual' file-existence check is so simple even
I could do it. And I don't mind doing it, right now in fact, if
I thought it'd be merged to the apache 2.0 tree.
Am I correct in assuming it would not? Because if it would you can
expect a patch from me very soon.
But it's not my decision to make.
If I'm being whiny about anything that's it.
> 2. You're not helping others help you. At every stage you simply stop
> and say "it doesn't work" rather than explictly describing what you
> are trying to do and what happens when you try it.
I was thinking it was a configuration flag that I missed and that
elaboration beyond what I had already done would be pointless.
I see you've been helping people with apache for years.
Freely I assume. I'd be fed up with everybody by now too...
But I still think the proper solution is to have used AddHandler/Action.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Joshua Slive <js...@gmail.com>.
On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> On Wed, May 04, 2005 at 04:45:44PM -0400, Joshua Slive wrote:
> > On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > > > The env variables supplied may look slightly different when using
> > > > ScriptAlias rather than Action, but you should be able to get all the
> > > > same info.
> > >
> > > Ah, yes. That's my current problem:
> > > None of the ENV variables are making it to the script.
> 1) What change can I possibly make to the script if environment variables
> are no longer a way to pass in information? Do I have to create a file
> for the inputs? What a horrible "solution" to what should be a simple
> problem. Other than that I cannot think of any 'small' changes I can
> make to the script.
As I said above, the env variables are still there. Point your
ScriptAlias at a standard environment-dumping script and take a look.
I'm annoyed for two reasons:
1. You're whining about something not getting done in an open-source
project that you are getting for free. If you want it done, hire
someone to do it for you.
2. You're not helping others help you. At every stage you simply stop
and say "it doesn't work" rather than explictly describing what you
are trying to do and what happens when you try it.
Joshua.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Charlton Harrison <ch...@dynet.com>.
On Wed, May 04, 2005 at 04:45:44PM -0400, Joshua Slive wrote:
> On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > > The env variables supplied may look slightly different when using
> > > ScriptAlias rather than Action, but you should be able to get all the
> > > same info.
> >
> > Ah, yes. That's my current problem:
> > None of the ENV variables are making it to the script.
> >
> > What a pain.
> >
> > I really wish the 'virtual' Action option had been ported back to 2.0.
> > This bug was opened in April 2002 and still no one I know is using 2.1 yet.
>
> This thread is getting annoying.
You asked me to raise the issue on the list. I'm not the one trying to
start a flame-war here...
> Your problem is not at all complicated. At worst, it requires a small
> change in your script. Or you can use version 2.1. Or you can
> backport the patch yourself into 2.0.
I agree it should not be at all complicated, but that doesn't change the
fact that I've spent all day looking into this and I still can't figure
out any eloquent (or even feasible) solution to the problem...
1) What change can I possibly make to the script if environment variables
are no longer a way to pass in information? Do I have to create a file
for the inputs? What a horrible "solution" to what should be a simple
problem. Other than that I cannot think of any 'small' changes I can
make to the script.
2) Version 2.1 has been in beta for years and there isn't even a port for
Gentoo out yet. However this is probably what I'm gonna end up doing.
3) I'll leave patching up to the developers since I really don't want to
repatch everytime my system automatically updates. If the developers
don't think this is "critical enough" to back-port, I'll just assume
what I'm trying to do cannot be done on apache 2.0. Chances are I'll
have to go to 2.1 anyway... one day...
> But if you'd prefer to just complain, feel free. Just don't expect it
> to get you anywere.
I'm sorry if my tone bothered you. If I knew the answer I would have
subscribed to the apache bugzilla so that I could post solution(s) to
the problem on the bug itself and save other people some time.
It appears that ENV variables cannot currently be passed to scripts using
ScriptAliasMatch, so I see this as still a limitation.
Perhaps that's the reason this whole thing remains an undocumented mystery?
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Joshua Slive <js...@gmail.com>.
On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > The env variables supplied may look slightly different when using
> > ScriptAlias rather than Action, but you should be able to get all the
> > same info.
>
> Ah, yes. That's my current problem:
> None of the ENV variables are making it to the script.
>
> What a pain.
>
> I really wish the 'virtual' Action option had been ported back to 2.0.
> This bug was opened in April 2002 and still no one I know is using 2.1 yet.
This thread is getting annoying.
Your problem is not at all complicated. At worst, it requires a small
change in your script. Or you can use version 2.1. Or you can
backport the patch yourself into 2.0.
But if you'd prefer to just complain, feel free. Just don't expect it
to get you anywere.
Joshua.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Charlton Harrison <ch...@dynet.com>.
On Wed, May 04, 2005 at 04:26:00PM -0400, Joshua Slive wrote:
> On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > Sorry, I had but I forgot to include the output since it didn't seem
> > to be very descriptive. Now I realize what is happening though.
> > This is from the error log:
> >
> > [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250] cat:
> > [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250] : No such file or directory
> > [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250]
> >
> > It is calling the reencode.cgi script now I've discovered. But I don't
> > think the arguments are being passed correctly.
>
> Yes, that error log output is stderr from your cgi script.
>
> The env variables supplied may look slightly different when using
> ScriptAlias rather than Action, but you should be able to get all the
> same info.
Ah, yes. That's my current problem:
None of the ENV variables are making it to the script.
What a pain.
I really wish the 'virtual' Action option had been ported back to 2.0.
This bug was opened in April 2002 and still no one I know is using 2.1 yet.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Joshua Slive <js...@gmail.com>.
[Directing back to the list.]
On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> Sorry, I had but I forgot to include the output since it didn't seem
> to be very descriptive. Now I realize what is happening though.
> This is from the error log:
>
> [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250] cat:
> [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250] : No such file or directory
> [Wed May 04 15:13:03 2005] [error] [client 65.245.17.250]
>
> It is calling the reencode.cgi script now I've discovered. But I don't
> think the arguments are being passed correctly.
Yes, that error log output is stderr from your cgi script.
The env variables supplied may look slightly different when using
ScriptAlias rather than Action, but you should be able to get all the
same info.
Joshua.
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Charlton Harrison <ch...@dynet.com>.
On Wed, May 04, 2005 at 03:52:51PM -0400, Joshua Slive wrote:
> On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> > ScriptAliasMatch "\.(ogg|mp3)$" /cgi-bin/reencode.cgi
>
> Try:
> ScriptAliasMatch "\.(ogg|mp3)$" /usr/local/apache2/cgi-bin/reencode.cgi
> (or wherever your cgi-bin directory is located).
Nope doesn't work. Gives me a 403 - forbidden error.
I'm currently working on figuring out what's going on here.
All the file & directory permissions are good...
---------------------------------------------------------------------
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] Stuck - bug#8431
Posted by Joshua Slive <js...@gmail.com>.
On 5/4/05, Charlton Harrison <ch...@dynet.com> wrote:
> ScriptAliasMatch "\.(ogg|mp3)$" /cgi-bin/reencode.cgi
Try:
ScriptAliasMatch "\.(ogg|mp3)$" /usr/local/apache2/cgi-bin/reencode.cgi
(or wherever your cgi-bin directory is located).
Joshua.
---------------------------------------------------------------------
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