-4

Error while uploading an image from any other path in my system:

PHP Fileinfo extension must be installed/enabled to use Intervention Image.

sanyassh
  • 8,100
  • 13
  • 36
  • 70
  • 1
    Possible duplicate of [PHP Fileinfo extension must be installed/enabled to use Intervention Image](https://stackoverflow.com/questions/44426078/php-fileinfo-extension-must-be-installed-enabled-to-use-intervention-image) – Robert May 17 '19 at 14:06

1 Answers1

0

As you are using WAMPServer the FileInfo extension should have been enabled out of the box.

But you can enable it easily using the wampmanager menus:

(left click) wampmanager->PHP-> Php Extensions ... 

then click on FileInfo if it does not have a green tick beside it. This will amend the php.ini file and then restart Apache to activate the change.

enter image description here

Now if you are getting this error while using the PHP CLI then you will have to manually edit the php.ini file that controls the PHP CLI environment. Its not the same one that controls PHP under Apache.

So edit C:\wamp64\bin\php\phpx.y.x\php.ini where phpx.y.x is the version of PHP you are using.

Find the line #extension=fileinfo and remove the #.

Next time you run the PHP CLI it should pickup that change

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149