Bug #47969
closedCall to undefined function mime_content_type()
100%
Description
Call to undefined function mime_content_type() on fetching the mime type of the favicon.
I'm still investigating the PHP versions and environment. However it looks like a superfluous regression from #46126
Updated by Borries Jensen over 11 years ago
After an update from 4.5.25 to 4.5.26 the same problem exists.
PHP version used on one dev/test server is 5.2.5.
Updated by Oliver Hader over 11 years ago
- Priority changed from Should have to Must have
Updated by Oliver Hader over 11 years ago
Borries Jensen wrote:
After an update from 4.5.25 to 4.5.26 the same problem.
PHP Version used on one Dev/Test-Server is 5.2.5
Thanks for your response. What distribution/operating system and which version are you using?
Is it a custom compiled PHP version or a standard package of PHP that is being used?
Updated by Borries Jensen over 11 years ago
Ok, detailed info of the dev machine follows:
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10
PATCHLEVEL = 2
PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli)
This PHP version is/was the one from SLES repository (no custom compilation done by us).
Updated by Markus Klein over 11 years ago
What's going on here??
mime_content_type is available since PHP 4.3, so the method should be present in 5.2.5.
Updated by Borries Jensen over 11 years ago
Hm, am i right that to use the function mime_content_type() the server needs not only the apache module "mod_mime" but also "mod_mime_magic" ?
I just checked the server which causes the mentioned error.
Only "mod_mime" is active there.
Maybe that's causing the error.
Updated by Thorsten Kahler over 11 years ago
According to http://php.net/manual/en/fileinfo.installation.php the Fileinfo extension requires a (patched) magic_open
library (libmagic
) in PHP versions < 5.3.0. It is provided and enabled by default, but still not part of the PHP core.
As of PHP 5.3.0 (?) mime_content_type()
is deprecated and replaced by the finfo
class.
All in all: these functions/classes seem to be moving ground and might require a more sophisticated approach. I think a wrapper method to abstract from the different implementations should help.
Updated by Markus Klein over 11 years ago
There's another requirement that might play a role: required library "magic_open"
http://at1.php.net/manual/en/fileinfo.requirements.php
Updated by Borries Jensen over 11 years ago
Only enabling "mod_mime_magic" did not solve the problem.
Just tried it on the mentioned machine.
Updated by Oliver Hader over 11 years ago
It's a regression thus needs to be fixed. Not having a mime-type for the favicon does not harm (as it has been before), but running into a fatal error on each frontend request does. No need to discuss that further - it's a bug.
Updated by Markus Klein over 11 years ago
I guess a simple function_exists() call to check the existence is fine?
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/20557
Updated by Christian Kuhn over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e0603861b30fb62d81bbfbd9c13670330711f088.
Updated by Tomas Norre Mikkelsen over 11 years ago
Hi,
Will these result in a new TYPO3 release? Or just included in next release? I have a lot of solutions not updated cause of the issue.
Updated by Markus Klein over 11 years ago
@Tomas: It will definitely be included in the next bugfix release. In the meanwhile you can apply the patch manually to your installations.
Updated by Tomas Norre Mikkelsen over 11 years ago
@Markus: Do you know when next release will be? Have about 15 servers which need to be patched. And normally I/we don't allow "manipulated" sources.
Updated by Ernesto Baschny over 11 years ago
- Category changed from 1394 to Frontend
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed