4

I'm trying to upload an image with validation: 'image|mimes:jpeg,png,jpg,gif,svg|max:2048' Works fine on local. But fails on cPanel. The cPanel version is 90.0.6 I've tried a couple things inside cPanel. But I couldn't figure out how do I enable the fileinfo extension. Please help.enter image description here

Leutecia
  • 95
  • 1
  • 4
  • 9

3 Answers3

3

Sorry, couldn't comment due to profile limitations that's why posting it in the answer section.

You can contact your hosting provider and ask them to enable the extension for you. There is no way to enable it by yourself in shared hosting.

yasir gakhar
  • 113
  • 10
3

Make sure your host provider added the extension file in their PHP config.

You can enable fileinfo extension from Cpanel,

Kindly Go to Software => Select PHP Version =>

enable the check box fileinfo to use fileinfo extension.

Stanley
  • 41
  • 3
0

You should enable the following line in your php.ini and then restart your apache extension=php_fileinfo.dll

Enabling mean just uncomment the line in your php.ini file

i.e: From this ;extension=php_fileinfo.dll to extension=php_fileinfo.dll

just remove (;) and save it then restart your apache.