1

I uncommented

extension=php_fileinfo.dll 

in both php.ini's (production and development), but still can't install package using composer. When I run php -m , I can't see fileinfo module. I'm using xampp.

Can someone help ?

hassan
  • 7,812
  • 2
  • 25
  • 36
Danilo
  • 43
  • 2
  • 8
  • Did you restart your webserver (i. e. Apache)? The module should be loaded after the restart. – codedge May 27 '17 at 13:52
  • @codedge Yes, I did. And I'm still not seeing it when type ` php -m ` – Danilo May 27 '17 at 15:20
  • there is also a different php.ini for CLI and web server. Did you enable the extension in your php.ini for CLI as well? – codedge May 27 '17 at 15:21
  • I have INI-PRODUCTION and INI-DEVELOPMENT files. And I uncomment fileinfo in both of them. – Danilo May 27 '17 at 15:24
  • As I said, there is a php configuration for command line (http://php.net/manual/en/features.commandline.php) - which is used when you run 'php -m'. Please check that you enabled the module there as well. Otherwise you wont see the change. If you want to check if your changes, that you made is successful, create a script with 'echo phpinfo();' and check the output. – codedge May 27 '17 at 15:28
  • Just by chance - same issue as here? https://stackoverflow.com/questions/28507943/intervention-image-requires-fileinfo – codedge May 27 '17 at 22:22
  • Yes, the same. Except I have this problem on my local machine with XAMPP. On other pc there is no issue, and I've done everything the same. – Danilo May 28 '17 at 15:54

1 Answers1

2

Found solution to this in MAMP.

PHP 7.1.5 is used as an example, but you likely are using a different version.

In addition to editing the php.ini in mamp\bin\php7.1.5\php.ini, you need to add extension=php_fileinfo.dll in mamp\conf\php7.1.5\php.ini. Notice the conf folder.

In configurations, the file doesn't seem to be related to the running server, but it does in fact make a difference.

Dmitriy Kravchuk
  • 476
  • 4
  • 16