Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    That’s an error with your php configuration somewhere. Either the mime magic database is missing, php doesn’t have permissions to access it, or php needs to be told to look somewhere else. I’ve never had that happen before, is this on shared hosting, vps, dedicated server? What OS?

    Thread Starter haleeben

    (@haleeben)

    Shared host, Linux.

    My provider is Site5.com

    Plugin Author nosilver4u

    (@nosilver4u)

    Then I would contact your webhost, they have something misconfigured (unless you are using your own custom php.ini).

    Thread Starter haleeben

    (@haleeben)

    I contacted the webhost and found the location for the magic database is usr/share/magic
    not
    usr/share/misc/magic

    Where do I need to change this?

    Thread Starter haleeben

    (@haleeben)

    So my host found a fix for this problem but it’s not a very good one as it changes line 465 in the ewww-image-optimizer.php file from this
    $finfo = finfo_open(FILEINFO_MIME);
    to this
    $finfo = finfo_open(FILEINFO_MIME, '/usr/share/magic');

    it solves the problem but it will get overridden with the next update.

    and after reading the php docs for the finfo_open() function and it says this for the second parameter

    “Name of a magic database file, usually something like /path/to/magic.mime. If not specified, the MAGIC environment variable is used. If the environment variable isn’t set, then PHP’s bundled magic database will be used. Passing NULL or an empty string will be equivalent to the default value.”

    I checked $SERVER[‘MAGIC’] and it is NULL, is this why I’m getting the error?

    This is all a bit beyond me.

    Plugin Author nosilver4u

    (@nosilver4u)

    That is possible. Can you create a file with this:

    <?php phpinfo(); ?>

    and post the link to it?

    Plugin Author nosilver4u

    (@nosilver4u)

    Did you figure out what the problem was?

    Thread Starter haleeben

    (@haleeben)

    Sorry I didn’t get back to you earlier.
    The host admitted that after further investigation there is a problem with the the setup. Here is what they said

    “it might be indeed related that fileinfo is not yet fully enabled on this shared server, and I’ve checked also with our systems team regarding this extension and got the confirmation that the fileinfo will be soon re-deployed via RPM on all server in our fleet, until that the additional specification over to /usr/share/magic is required.”

    The strange thing is that I have reseller account and around 10 sites on the same server and only some of them show the error but other ones are fine and one site that did have the error is now working correctly, strange.

    Anyway here is the phpinfo for one of the sites that still has the error.

    Plugin Author nosilver4u

    (@nosilver4u)

    Yeah, that’s definitely a configuration error on their end. I don’t see anything on your phpinfo that indicates the /usr/share/misc/magic path. However, PHP throws a warning at the very bottom of that page which would indicate it is indeed mis-configured.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘errors after moving server’ is closed to new replies.