Debian Bug report logs -
#271856
MultiViews makes PHP pages inaccessible by Googlebot [config patch]
Reported by: Aurelien Jarno <aurel32@debian.org>
Date: Wed, 15 Sep 2004 18:18:03 UTC
Severity: normal
Tags: patch
Fixed in version 6:4.4.6-2+rm
Done: Marco Rodrigues <gothicx@gmail.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#271856; Package libapache2-mod-php4.
(full text, mbox, link).
Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to Adam Conrad <adconrad@0c3.net>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: libapache2-mod-php4
Version: 4.3.8-9
Severity: wishlist
Tags: patch
When using Apache with MultiViews enabled for content negociation, some
browser (and a lot of search engines such as Google) can't access php
pages, and receive a "406 Not Acceptable" error from Apache.
The problem appears on clients that send an Accept header such as
"text/html,text/plain,application/xhtml+xml". When apache is looking for
the right file to serve, apache only lookup for files that are of the
listed type and not of type "application/x-httpd-php".
One solution is to change the line
AddType application/x-httpd-php .php
into
AddHandler php-script .php
AddType text/html .php
I don't know the consequences such a change have, so I don't ask you to
change that in /etc/apache2/mods-available/php4.conf. However, adding
such lines as comments could help users to fix the problem. At least I
would have find the solution a lot faster, so I think it would be the
same for other users.
So in short, here is what I suggest for that config file:
# If you use Apache with MultiViews enabled for content negociation, and
# you get complains of 406 errors, you can try to comment the first
# following line, and uncomment the two next ones.
AddType application/x-httpd-php .php
#AddHandler php-script .php
#AddType text/html .php
AddType application/x-httpd-php-source .phps
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-rc2
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (ignored: LC_ALL set to fr_FR.UTF-8)
Information forwarded to debian-bugs-dist@lists.debian.org, Adam Conrad <adconrad@0c3.net>:
Bug#271856; Package libapache2-mod-php4.
(full text, mbox, link).
Acknowledgement sent to Richard Atterer <atterer@debian.org>:
Extra info received and forwarded to list. Copy sent to Adam Conrad <adconrad@0c3.net>.
(full text, mbox, link).
Message #10 received at 271856@bugs.debian.org (full text, mbox, reply):
severity 271856 normal
retitle 271856 MultiViews makes PHP pages inaccessible by Googlebot [config patch]
tags patch
thanks
See <http://tranchant.plus.com/notes/multiviews> for a good discussion of
the problem. The fix suggested by the OP is correct.
This fix is also _officially_recommended_ by upstream:
http://www.php.net/manual/en/faq.installation.php#faq.installation.apache.multiviews
The only reason why upstream do not include this configuration by default
is that they want their Apache config to work with all versions of Apache,
but the fix only works for Apache 2.
Please include the fix in the libapache2-mod-php4 package!
I do believe this is a real bug, so please bear with me if I raise the
severity to normal. It is not obvious at all that if a file called
"foo.html.php" is linked to as "foo.html" on your website, then the default
Debian Apache configuration will make that page inaccessible for Google.
The default configuration should avoid that pitfall!
Consider shipping the following as the content of
/etc/apache2/mods-available/php4.conf:
# We use "AddHandler" to map ".php" to mod_php. Using
# "AddType application/x-httpd-php php" would make your pages inaccessible
# for Googlebot if you use MultiViews, e.g. if you omit the ".php"
# extension in links to your web pages. For details, see:
# http://tranchant.plus.com/notes/multiviews
# http://www.php.net/manual/en/faq.installation.php#faq.installation.apache.multiviews
<IfModule mod_php4.c>
AddType text/html php phtml php3 php4
AddHandler php-script php phtml php3 php4
AddType application/x-httpd-php-source .phps
</IfModule>
As for negative side-effects of this configuration, I do not believe there
are any. mod_php is called both for "php-script" and
"application/x-httpd-php" in the same way. The only thing that's different
is that the mapping ".php"->"call mod_php" is not made indirectly by
assigning an (otherwise completely meaningless!) MIME type to the .php
extension.
Cheers,
Richard
Severity set to `normal'.
Request was from Richard Atterer <atterer@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Changed Bug title.
Request was from Richard Atterer <atterer@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#271856; Package libapache2-mod-php4.
(full text, mbox, link).
Acknowledgement sent to Lucas Nussbaum <lucas@lucas-nussbaum.net>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>.
(full text, mbox, link).
Message #19 received at 271856@bugs.debian.org (full text, mbox, reply):
reassign 370375 libapache2-mod-php5
reassign 341346 libapache2-mod-php5
reassign 392839 libapache2-mod-php5
reassign 298052 libapache2-mod-php5
reassign 424937 libapache2-mod-php5
reassign 410549 libapache2-mod-php5
reassign 386041 libapache2-mod-php5
reassign 271856 libapache2-mod-php5
reassign 456728 libapache2-mod-php5
reassign 264806 libapache2-mod-php5
reassign 323585 libapache2-mod-php5
thanks
The libapache2-mod-php4 package has been removed from Debian testing, unstable and
experimental. I am reassigning its bugs to the libapache2-mod-php5 package. Please
have a look at them, and close them if they don't apply to
libapache2-mod-php5 anymore.
Don't hesitate to reply to this mail if you have any question.
--
Lucas
Information stored:
Bug#271856; Package libapache2-mod-php4.
(full text, mbox, link).
Acknowledgement sent to sean finney <seanius@debian.org>:
Extra info received and filed, but not forwarded.
(full text, mbox, link).
Message #28 received at 271856-quiet@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
reassign 370375 libapache2-mod-php4
reassign 341346 libapache2-mod-php4
reassign 392839 libapache2-mod-php4
reassign 298052 libapache2-mod-php4
reassign 424937 libapache2-mod-php4
reassign 410549 libapache2-mod-php4
reassign 386041 libapache2-mod-php4
reassign 271856 libapache2-mod-php4
reassign 456728 libapache2-mod-php4
reassign 264806 libapache2-mod-php4
reassign 323585 libapache2-mod-php4
thanks
this is not the first time someone has done a mass-reassignment on old php4
bugs. blindly reassigning bugs from php4->php5 is not the proper protocol
here. just because php4 will not be in lenny does not mean that it is not
still in debian. furthermore, if the bug affected php5 it should have
already been cloned to php5.
thanks,
sean
[signature.asc (application/pgp-signature, inline)]
Reply sent
to Marco Rodrigues <gothicx@gmail.com>:
You have taken responsibility.
(Fri, 26 Mar 2010 16:21:23 GMT) (full text, mbox, link).
Notification sent
to Aurelien Jarno <aurel32@debian.org>:
Bug acknowledged by developer.
(Fri, 26 Mar 2010 16:21:23 GMT) (full text, mbox, link).
Message #33 received at 271856-done@bugs.debian.org (full text, mbox, reply):
Version: 6:4.4.6-2+rm
You filed the bug http://bugs.debian.org/271856 in Debian BTS
against the package libapache2-mod-php4. I'm closing it at *unstable*, but it will
remain open for older distributions.
For more information about this package's removal, read
http://bugs.debian.org/428266. That bug might give the reasons why
this package was removed and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
--
Marco Rodrigues
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Sat, 24 Apr 2010 07:32:05 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sun Jul 2 02:36:20 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.