Coin_op
Coin_op

Reputation: 10728

Finfo class not found in PHP 7.0.1

I'm having a look at PHP 7 and how well it plays with my current projects. One issue I've come across is the Finfo (fileinfo) class cannot be found.

new finfo(FILEINFO_MIME); // Class 'finfo' not found

As far as I am aware Finfo should be compiled automatically into PHP unless it is compiled with the flag --disable-fileinfo. Phpinfo makes no reference to fileinfo or the compile flag.

Has anyone else had this issue and found a solution?

Upvotes: 5

Views: 5817

Answers (1)

Federkun
Federkun

Reputation: 36964

As the documentation say:

Windows users must include the bundled php_fileinfo.dll DLL file in php.ini to enable this extension.

So, enable it in your php.ini with

extension = php_fileinfo.dll

Upvotes: 9

Related Questions