For some reason im getting these errors whenever i interact with the file manager

A PHP Error was encountered
Severity: Notice
Message: Undefined variable: whitelist
Filename: libraries/Mime_type.php
Line Number: 48

A PHP Error was encountered
Severity: 4096
Message: Argument 1 passed to EllisLab\ExpressionEngine\Library\Mime\MimeType::addMimeTypes() must be of the type array, null given, called in /home/forge/default/system/expressionengine/libraries/Mime_type.php on line 48 and defined
Filename: Mime/MimeType.php
Line Number: 82

A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: Mime/MimeType.php
Line Number: 84

It wont let me upload new files, or synchronize directories?

Its running EE 2.10.1, on a laravel forge made server. I checked all the folder permissions and it looks fine? any other ideas?


Did you run an EE upgrade recently?? They changed how they detect mime types:


Look at the change log for 2.10. They use a different mime-type library now... sounds like you upgraded, but it's possible your PHP version is out of date or missing a required module... please let us know your EE version, if you've upgraded, and your PHP and Apache version.

Edit Ahhhh... check out this file:


Does it look like this, and does it have file permissions set to 664??

$whitelist = array(
    'application/csv', // .csv
    'application/epub+zip', // .epub
    'application/excel', // .csv, .xl, .

    /* and so on ... */

    'video/x-ms-wmv', // .wmv
    'video/x-msvideo', // .avi
    'video/x-sgi-movie', // .movie

It's possible, that for some reason, that file wasn't updated. They changed the variable name of how they stored mime types as well.

  • I did upgrade recently and its running nginx instead of apache, maybe thats related? – Keith Mancuso Aug 10 '15 at 17:18
  • As for php its 5.6.7 so that should be ok? – Keith Mancuso Aug 10 '15 at 17:19
  • @KeithMancuso Answer updated. – jrothafer Aug 10 '15 at 17:27
  • Ahh yes! that was it, looks like that file wasnt updated. I normally skip the config folder when doing updates but i guess thats where i went wrong. Thanks so much! – Keith Mancuso Aug 10 '15 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.