Comment 2 for bug 1249858

Revision history for this message
Robert Lyon (robertl-9) wrote :

There is an option mentioned here -> https://bugs.php.net/bug.php?id=61940#1336148541
of a workaround to the problem.

if (version_compare(PHP_VERSION, '5.3.11') >= 0) {

    $magicfile = 'magic_php-gte-5_3_11.mgc';
} else {
    $magicfile = 'magic_php-lt-5-3-11.mgc';
}
$magicpath = __DIR__ . "/../../../config/{$magicfile}";

Where we use both our old magic DB (the one from Ubuntu/Debian), and the one bundled here: https://raw.github.com/php/php-src/master/ext/fileinfo/tests/magic

We could use this until the problem is fixed with PHP