Intervention/Image requires FileInfo

Kevin Upton picture Kevin Upton · Feb 13, 2015 · Viewed 9.2k times · Source

Im having trouble with Intervention/image, Laravel #composer install

- intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP
extension fileinfo is missing from your system.

I understand that it is trying to retrieve the extension fileinfo however I am having 0 luck with getting the extension to load.

I believe that as of PHP 5.4 the extension fileinfo is automatically enabled, however it isnt showing up in #php -m modules.

#pecl install fileinfo doesnt work either because my php version doesnt suit any versions of fileinfo.

My PHP version is:

PHP 5.4.37 (cli)

Operating System:

Linux
CentOS 6.5 cPanel 11.46 / Softaculous x64

Ive tried adding

extension = "fileinfo.so"

to the php.ini however to no luck, it does nothing.

NOTE: I managed to get the extension for windows version of php 5.4 working... Its just when I have uploaded my website to my server, I have been unable to get it to load, well get that library (Intervention/Image) to load.


Other details:

  • Server is a VPS with access to WHM and cPanel
  • Website works. Everything except the Intervention/Image

Answer

Nur Uddin picture Nur Uddin · May 28, 2017

go to 'Select PHP version ' under Software section in your cPanel. Then check fileinfo checkbox. Then save. That's it. enter image description here