PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Catching "File name too long" errors
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Catching "File name too long" errors

Réponse
 
LinkBack Outils de la discussion
Vieux 13/10/2006, 20h20   #1
Bob Arn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Catching "File name too long" errors


Is there a way to redirect on "file name too long" errors?

I'm using mod_rewrite to handle all unknown urls with an error page.
That's not working for this error. Apparently the "file name too long"
error occurs before mod_rewrite is invoked.

Setting up an ErrorDocument is also ignored, even though it looks to the
user (and listed in access.log) as a 403 error, it's not a normal 403
error.

Thanks

Bob
  Réponse avec citation
Vieux 13/10/2006, 20h55   #2
Joshua Slive
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Catching "File name too long" errors



On Oct 13, 3:20 pm, Bob Arn <nom...@nomail.bob> wrote:
> Is there a way to redirect on "file name too long" errors?
>
> I'm using mod_rewrite to handle all unknown urls with an error page.
> That's not working for this error. Apparently the "file name too long"
> error occurs before mod_rewrite is invoked.
>
> Setting up an ErrorDocument is also ignored, even though it looks to the
> user (and listed in access.log) as a 403 error, it's not a normal 403
> error.


What is the exact error message? I don't know of any "file name too
long" error. Perhaps you are thinking of the error that occurs when
the URI is bigger than the configured limit:
http://httpd.apache.org/docs/2.2/mod...mitrequestline

In general, these types of errors will not use ErrorDocuments supplied
by the admin. This is because the limits are made in the first place
to prevent resource usage or other bugs that may be triggered by
very-large inputs from the client. If you allow those requests to pass
through the normal request-processing phases (in order to trigger the
ErrorDocument) you expose the server to the very-large inputs. So
instead, they are simply immediately rejected with a hard-coded
message.

If you know your server can handle it, you can simply increase
LimitRequestLine to a very-large value.

Joshua.

  Réponse avec citation
Vieux 13/10/2006, 22h28   #3
Bob Arn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Catching "File name too long" errors

In article <1160769311.693034.173950@i3g2000cwc.googlegroups. com>,
"Joshua Slive" <jslive@gmail.com> wrote:

> On Oct 13, 3:20 pm, Bob Arn <nom...@nomail.bob> wrote:
> > Is there a way to redirect on "file name too long" errors?
> >
> > I'm using mod_rewrite to handle all unknown urls with an error page.
> > That's not working for this error. Apparently the "file name too long"
> > error occurs before mod_rewrite is invoked.
> >
> > Setting up an ErrorDocument is also ignored, even though it looks to the
> > user (and listed in access.log) as a 403 error, it's not a normal 403
> > error.

>
> What is the exact error message? I don't know of any "file name too
> long" error. Perhaps you are thinking of the error that occurs when
> the URI is bigger than the configured limit:
> http://httpd.apache.org/docs/2.2/mod...mitrequestline
>
> In general, these types of errors will not use ErrorDocuments supplied
> by the admin. This is because the limits are made in the first place
> to prevent resource usage or other bugs that may be triggered by
> very-large inputs from the client. If you allow those requests to pass
> through the normal request-processing phases (in order to trigger the
> ErrorDocument) you expose the server to the very-large inputs. So
> instead, they are simply immediately rejected with a hard-coded
> message.
>
> If you know your server can handle it, you can simply increase
> LimitRequestLine to a very-large value.


In my error.log:

[Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
too long: access to /879847594875.......

The limit for file names is not "very-large", it is only 255 chars. I
want it to be as long as LimitRequestLine. How can I do that?

Bob
  Réponse avec citation
Vieux 15/10/2006, 15h46   #4
Joshua Slive
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Catching "File name too long" errors



On Oct 13, 5:28 pm, Bob Arn <nom...@nomail.bob> wrote:

> [Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
> too long: access to /879847594875.......
>
> The limit for file names is not "very-large", it is only 255 chars. I
> want it to be as long as LimitRequestLine. How can I do that?


This is probably a limit in your operating system, rather than an
apache limit. But for this type of error, you should be able to use a
custom ErrorDocument. Have you tried placing the ErrorDocument
directive in the main part of httpd.conf (outside any <Directory>
section)?

Joshua.

  Réponse avec citation
Vieux 15/10/2006, 21h24   #5
Bob Arn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Catching "File name too long" errors

In article <1160923606.292537.188620@i42g2000cwa.googlegroups .com>,
"Joshua Slive" <jslive@gmail.com> wrote:

> On Oct 13, 5:28 pm, Bob Arn <nom...@nomail.bob> wrote:
>
> > [Thu Oct 12 23:09:24 2006] [error] [client 11.11.11.111] (36)File name
> > too long: access to /879847594875.......
> >
> > The limit for file names is not "very-large", it is only 255 chars. I
> > want it to be as long as LimitRequestLine. How can I do that?

>
> This is probably a limit in your operating system, rather than an
> apache limit. But for this type of error, you should be able to use a
> custom ErrorDocument. Have you tried placing the ErrorDocument
> directive in the main part of httpd.conf (outside any <Directory>
> section)?


Thanks for the suggestion. I have ErrorDocument in .htaccess. There,
ErrorDocument is the first line and works for other normal errors but
not this one. On my shared host I don't have access to httpd.conf. Will
that make a difference?

Bob
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h24.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10551 seconds with 13 queries