note 40903 added to installation

From: Date: Thu, 18 Mar 2004 15:58:48 +0000
Subject: note 40903 added to installation
Groups: php.notes 
Request: Send a blank email to php-notes+get-67023@lists.php.net to get a copy of this message
Alternative Apache configuration when using content negotiation =============================================================== There's a problem with the AddType method of linking .php files to the PHP DSO module: it breaks content negotiation. If you use Apache's MultiViews to make file extensions unnecessary in your URLs, you'll find that PHP files referenced thus are not served to any user agent that does not include application/x-httpd-php (or application/*) in its HTTP Accept header. Googlebot is one such user agent... The problem is that Apache does its content negotiation based on the MIME type associated with the file, and the AddType line makes it clear what .php files are. It does not know that .php files are eventually served as text/html or whatever, so it returns a 406 Not Acceptable error. The workaround is to replace the AddType line with: AddHandler php-script php AddType text/html php Works for me with Apache-2.0.48 and PHP-4.3.4. ---- Manual Page -- http://www.php.net/manual/en/installation.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+40903 Delete -- http://master.php.net/manage/user-notes.php?action=delete+40903&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+40903&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#67023) next »