To do this we use the finfo class. By default it loads the following magic database (according to manual):
If not specified, the MAGIC environment variable is used. If this variable is not set either, /usr/share/misc/magic is used by default. A .mime and/or .mgc suffix is added if needed.
From what I see, the MAGIC env isn't set, and there is a *directory* at /usr/share/misc/magic, and a *file* at /usr/share/misc/magic.mgc
This seems like a upstream bug in php, for now I will add in a check if /usr/share/misc/magic is a dir, and if it is then will try .mgc (which detects as html as expected)
This one is a tricky little bug.
We are reading the mimetype when we import it.
To do this we use the finfo class. By default it loads the following magic database (according to manual): misc/magic is used by default. A .mime and/or .mgc suffix is added if needed.
If not specified, the MAGIC environment variable is used. If this variable is not set either, /usr/share/
From what I see, the MAGIC env isn't set, and there is a *directory* at /usr/share/ misc/magic, and a *file* at /usr/share/ misc/magic. mgc
This seems like a upstream bug in php, for now I will add in a check if /usr/share/ misc/magic is a dir, and if it is then will try .mgc (which detects as html as expected)
Cheers,
Hugh