#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,660
    Rep Power
    171

    Failed to load magic database


    I upload files successfully but I get this:

    Does anyone know why I get this?

    A PHP Error was encountered

    Severity: Warning

    Message: finfo_open(): Failed to load magic database at .

    Filename: libraries/Upload.php

    Line Number: 1035
    PHP Code:
    if (function_exists('finfo_file'))
            {
                
    $finfo finfo_open(FILEINFO_MIME);
                if (
    is_resource($finfo)) // It is possible that a FALSE value is returned, if there is no magic MIME database file found on the system
                
    {
                    
    $mime = @finfo_file($finfo$file['tmp_name']);
                    
    finfo_close($finfo);

                    
    /* According to the comments section of the PHP manual page,
                     * it is possible that this function returns an empty string
                     * for some files (e.g. if they don't exist in the magic MIME database)
                     */
                    
    if (is_string($mime) && preg_match($regexp$mime$matches))
                    {
                        
    $this->file_type $matches[1];
                        return;
                    }
                }
            } 
    Thank you
  2. #2
  3. Mad Scientist
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2007
    Location
    North Yorkshire, UK
    Posts
    3,661
    Rep Power
    4123

    Google is your friend


    I said I didn't like ORM!!! <?php $this->model->update($this->request->resources[0])->set($this->request->getData())->getData('count'); ?>

    PDO vs mysql_* functions: Find a Migration Guide Here

    [ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]

IMN logo majestic logo threadwatch logo seochat tools logo