Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476060 - =www-apps/phpsysinfo-3.1.4 - Give a warning regarding .htaccess file syntax error for apache-2.4.x, or appropriately depend / remove it based on version.
Summary: =www-apps/phpsysinfo-3.1.4 - Give a warning regarding .htaccess file syntax e...
Status: RESOLVED DUPLICATE of bug 454572
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-07 08:58 UTC by Toralf Förster
Modified: 2014-12-16 09:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2013-07-07 08:58:49 UTC
There should be at least an ewarn in the ebuild that for apache-2.4 users the file /var/www/localhost/htdocs/phpsysinfo/.htaccess has to be removed/replaced. That file only works with apache-2.2 right.
Comment 1 Tim Harder gentoo-dev 2013-12-10 08:03:12 UTC
If you have a patch that will make it work for apache-2.2 and 2.4 I'd be happy to apply it if you upstream it as well.

Otherwise you should open an issue upstream to resolve this.
Comment 2 Toralf Förster gentoo-dev 2013-12-10 17:58:24 UTC
looks like this is needed :

https://httpd.apache.org/docs/current/mod/mod_access_compat.html

/me wodners how to activate it
Comment 3 Toralf Förster gentoo-dev 2013-12-10 18:00:23 UTC
But at least this works here for me :

n22unst4 ~ # diff .htaccess /var/www/localhost/htdocs/phpsysinfo/.htaccess
1,4c1,3
< <files phpsysinfo.ini>
<   order deny,allow
<   deny from all
< </files>
---
> <Files phpsysinfo.ini>
>   Require host 127.0.0.1
> </Files>
Comment 4 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-12-10 19:01:26 UTC
(In reply to Toralf Förster from comment #3)
> But at least this works here for me :
> 
> n22unst4 ~ # diff .htaccess /var/www/localhost/htdocs/phpsysinfo/.htaccess
> 1,4c1,3
> < <files phpsysinfo.ini>
> <   order deny,allow
> <   deny from all
> < </files>
> ---
> > <Files phpsysinfo.ini>
> >   Require host 127.0.0.1
> > </Files>

Please check the "Run-Time Configuration Changes" section on the Apache upgrade guide[1].

 [1] - http://httpd.apache.org/docs/trunk/upgrading.html

In your case, the correct change would be:

<Files phpsysinfo.ini>
   Require all denied
</Files>

If you want to allow access from localhost, then your change is correct.
Comment 5 Toralf Förster gentoo-dev 2013-12-10 20:11:50 UTC
right, this didff works :

n22unst4 ~ # diff .htaccess /var/www/localhost/htdocs/phpsysinfo/.htaccess
2,3c2
<   order deny,allow
<   deny from all
---
>   Require all denied



FWIW I informed upstream a while ago but upstream wasn't too much interested.
Comment 6 Tim Harder gentoo-dev 2013-12-10 20:25:05 UTC
(In reply to Toralf Förster from comment #5)
> right, this didff works :
> 
> n22unst4 ~ # diff .htaccess /var/www/localhost/htdocs/phpsysinfo/.htaccess
> 2,3c2
> <   order deny,allow
> <   deny from all
> ---
> >   Require all denied

Please use unified diffs.

Probably the best thing to do would be to point people at a wiki page documenting this like jmbsvicetto recommended and/or check if apache is installed and warn if so.
Comment 7 Thomas Beutin 2014-02-14 10:50:33 UTC
(In reply to Toralf Förster from comment #2)
[...]
> https://httpd.apache.org/docs/current/mod/mod_access_compat.html
[...]

This seems to be not a way one should waste time on:
"Note

The directives provided by mod_access_compat have been deprecated by the new authz refactoring. Please see mod_authz_host."
Comment 8 Pacho Ramos gentoo-dev 2014-12-16 09:47:39 UTC

*** This bug has been marked as a duplicate of bug 454572 ***