• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call to undefined function CodeIgniter\Files\finfo_open()

#1
Hello.

When I try to upload a new image and get mimetype, I get errors about finfo_open.

In controller i have: 
Code:
52             $file = $this->request->getFile('userfile');
53             $typeOfFile = $file->getMimeType();


At line 53 it throws an error - "APPPATH/Controllers/Comunitate.php : 53 — CodeIgniter\Files\File->getMimeType ()". 
In SYSTEMPATH/Files/File.php at line 137 I have: Call to undefined function CodeIgniter\Files\finfo_open().

Please help me.
Reply

#2
What server are you running under? I thought this was enabled by default on PHP for versions 5.3 and higher. You might need to check your server setup to be sure it's enabled.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply

#3
(05-08-2019, 07:02 AM)kilishan Wrote: What server are you running under? I thought this was enabled by default on PHP for versions 5.3 and higher. You might need to check your server setup to be sure it's enabled.

On Windows xampp local worked perfectly. It seems that my hosting provider didn't activated fileinfo from php.
Now everything is fine. Thank you.
Reply

#4
Glad to hear it's working!
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.