jrakow Posted September 16, 2018 Share Posted September 16, 2018 Hello, I am working through Chapter 13 – Validating Files by Type. I get an error when I try to submit an RTF file (or any file type for that matter) through script 13.3 – upload_rtf.php Fatal error: Uncaught Error: Call to undefined function finfo_open() in C:\Apache24\htdocs\PHP_and_MySQL\Chapter13\upload_rtf.php:18 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\PHP_and_MySQL\Chapter13\upload_rtf.php on line 18 Line 18 is where the resource is created to check the file type $fileinfo = finfo_open[FILEINFO_MIME_TYPE]; Running PHP 7.2.1 Is there a setting in php.ini that needs to changed, or can you point me in the right direction? Thanks, jrakow Link to comment Share on other sites More sharing options...
Larry Posted September 17, 2018 Share Posted September 17, 2018 Yep! Per http://php.net/manual/en/fileinfo.installation.php Quote Windows users: just edit php.ini and uncomment this line: extension=php_fileinfo.dll Remember to restart Apache for new php.ini to take effect. (I assume you're using Windows.) Link to comment Share on other sites More sharing options...
Recommended Posts