| Summary: | AddType... php is no longer effective | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Jason Carlson <gentoo> |
| Component: | [OLD] Server | Assignee: | Apache Team - Bugzilla Reports <apache-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | php-bugs, ticho |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Bug Depends on: | 116516 | ||
| Bug Blocks: | |||
|
Description
Jason Carlson
2005-12-23 03:45:24 UTC
Okay, found reason it is happening, but not sure what to do. The httpd.conf file has the line: TypesConfig /etc/mime.types And that /etc/mime.types file has "application/x-httpd-php" lines assigning extensions such as .php and .php4 to them. I commented out the related php lines in the /etc/mime.types and it works just fine now. But will this break cli? Maybe I should be removing that line from httpd.conf instead - Should apache be linking to that file in the first place? Thoughts? Hi, You've found a real problem here. Apache *should* be using that file, instead of the one that ships with Apache. It's a deliberate decision to reduce duplication. But, as you've pointed out, /etc/mime.types has too many entries in it for it to be 100% compatible with the Apache config files. I don't recommend removing entries from /etc/mime.types. Depending on what other software you install, things could break in annoying ways. The easiest solution is for us to add a RemoveType for php (and for anything else that can be installed via an Apache module) to the default Apache config files. Best regards, Stu (In reply to comment #2) > The easiest solution is for us to add a RemoveType for php (and for anything > else that can be installed via an Apache module) to the default Apache config > files. Stuart, can you verify that RemoveType works for you? Someone reported that it's broken in recent apache versions (Bug 112247). This is the wrong solution. You should use AddHandler for php, instead of screwing with the MIME TYpes. PHP is a HANDLER, not a file format. -Paul Hi Paul, Sorry, mod_php only requires AddType to activate, not AddHandler. AddHandler's only needed for setting up php-cgi. http://www.php.net/manual/en/install.unix.apache2.php Best regards, Stu After a discussion in #gentoo-apache, we've decided to get the PHP entries removed from /etc/mime.types. I've filed a bug with the net-mail herd (who own this package) to get it fixed. For now, just remove the entries by hand from your local copy. Best regards, Stu The PHP entries were removed from /etc/mime.types, marking this as fixed. Best regards, CHTEKK. |