Unable to guess the MIME type as no guessers are available. How do I install php_fileinfo extension in cPanel?

Viewed 5975

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

2 Answers

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.

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.

Related