You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by David Gonzalez <dg...@rafastd.org> on 2003/11/19 18:37:35 UTC

[users@httpd] ERROR DOCUMENTS ON 2.0.48

Hello users

  Why  do i get these error when using error documents on httpd 2.0.48
  on MDK 9.1

  lynx http://localhost/test.php (this page doesn't exist)
  
 [an error occurred while processing this directive] The requested URL was not found on this server. If you entered the
 URL manually please check your spelling and try again. [an error occurred while processing this directive]

 and this shows on the LOG

[Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
"include/top.html" in parsed file /wwwroot/error/HTTP_NOT_FOUND.html.var
[Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
"include/bottom.html" in parsed file /wwwroot/error/HTTP_NOT_FOUND.html.var

 I  haven't  changed  anything. on the httpd.conf file so i don't know
 what's wrong?.

 I just put php to proccess html files like

 AddType application/x-httpd-php .html

 I believe though not sure that's the issue

 Thanx

-- 
Best regards,
 David                          mailto:dgonzalez@rafastd.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


Re: [users@httpd] ERROR DOCUMENTS ON 2.0.48

Posted by André Malo <nd...@perlig.de>.
* David Gonzalez <dg...@rafastd.org> wrote:

>  I  haven't  changed  anything. on the httpd.conf file so i don't know
>  what's wrong?.
> 
>  I just put php to proccess html files like
> 
>  AddType application/x-httpd-php .html
> 
>  I believe though not sure that's the issue

Yes, it is. You should restore the type for the error directory. Or better,
limit it to where you need it.

nd

---------------------------------------------------------------------
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[2]: [users@httpd] ERROR DOCUMENTS ON 2.0.48

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 20 Nov 2003, David Gonzalez wrote:
> JS> Yep, that's it.  When IncludesNoExec is set (as it is in the errors
> JS> directory), the mime type of the included file must start with text/.
>
> JS> A few ways to fix this:
>
> JS> 1. Use AddHandler for your php rather than AddType.  AddType should be
> JS> used only for real content types.
>
> JS> 2. Restrict your php processing only to directories that really need it.
> JS> The error directories do not.
>
> JS> 3. Change the IncludesNoExec to just Includes in the <Directory> section
> JS> for the errors directory.
>
> JS> Joshua.
>
> That's great i've already deleted the AddType for .html files and it's
> fixed Thanx.
>
> Though you left me a litle confused with the fact that i should permit
> .php like CGI on specific places.
>
> Would you be so kind and please tell me how could i achieve steps 1, 2
> & 3?.

You don't need to do all of them.  Any one of them will work.

1. Simply replace the AddType with something like
AddHandler php5-script .html

2. Scope the AddType in a <Directory> as in
<Directory /usr/local/apache2/htdocs>
AddType php....
</Directory>

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[2]: [users@httpd] ERROR DOCUMENTS ON 2.0.48

Posted by David Gonzalez <dg...@rafastd.org>.
Hello Joshua,

Wednesday, November 19, 2003, 1:06:46 PM, you wrote:


JS> On Wed, 19 Nov 2003, David Gonzalez wrote:
>> [Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
>> "include/top.html" in parsed file
>> /wwwroot/error/HTTP_NOT_FOUND.html.var
>> [Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
>> "include/bottom.html" in parsed file
>> /wwwroot/error/HTTP_NOT_FOUND.html.var
>>
>>  I  haven't  changed  anything. on the httpd.conf file so i don't know
>>  what's wrong?.
>>
>>  I just put php to proccess html files like
>>
>>  AddType application/x-httpd-php .html

JS> Yep, that's it.  When IncludesNoExec is set (as it is in the errors
JS> directory), the mime type of the included file must start with text/.

JS> A few ways to fix this:

JS> 1. Use AddHandler for your php rather than AddType.  AddType should be
JS> used only for real content types.

JS> 2. Restrict your php processing only to directories that really need it.
JS> The error directories do not.

JS> 3. Change the IncludesNoExec to just Includes in the <Directory> section
JS> for the errors directory.

JS> Joshua.

That's great i've already deleted the AddType for .html files and it's
fixed Thanx.

Though you left me a litle confused with the fact that i should permit
.php like CGI on specific places.

Would you be so kind and please tell me how could i achieve steps 1, 2
& 3?.

Thanx a lot you've been great help.

This Forum Rocks!.

-- 
Best regards,
 David                            mailto:dgonzalez@rafastd.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


Re: [users@httpd] ERROR DOCUMENTS ON 2.0.48

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 19 Nov 2003, David Gonzalez wrote:
> [Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
> "include/top.html" in parsed file /wwwroot/error/HTTP_NOT_FOUND.html.var
> [Wed Nov 19 12:27:56 2003] [error] [client 127.0.0.1] unable to include potential exec
> "include/bottom.html" in parsed file /wwwroot/error/HTTP_NOT_FOUND.html.var
>
>  I  haven't  changed  anything. on the httpd.conf file so i don't know
>  what's wrong?.
>
>  I just put php to proccess html files like
>
>  AddType application/x-httpd-php .html

Yep, that's it.  When IncludesNoExec is set (as it is in the errors
directory), the mime type of the included file must start with text/.

A few ways to fix this:

1. Use AddHandler for your php rather than AddType.  AddType should be
used only for real content types.

2. Restrict your php processing only to directories that really need it.
The error directories do not.

3. Change the IncludesNoExec to just Includes in the <Directory> section
for the errors directory.

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