9

I've used intervention image package in Laravel 5 project. It is working in local server. Now when I uploaded in shared server via cpanel, I am getting error:

MissingDependencyException in ImageManager.php line 123:
PHP Fileinfo extension must be installed/enabled to use Intervention Image.

Server has PHP Version 5.6.19

I went through requires ext-fileinfo. How do I add that into my composer.json file? but couldn't get solution. Where is the php.ini file inside my cpanel?

psuresh
  • 535
  • 2
  • 13
  • 25
  • And what's the question? It's pretty obvious you're missing the FileInfo extension on the shared server. Install it. – Capsule Jun 08 '17 at 03:22
  • 1
    Possible duplicate of [requires ext-fileinfo. How do I add that into my composer.json file?](https://stackoverflow.com/questions/23771117/requires-ext-fileinfo-how-do-i-add-that-into-my-composer-json-file) – Edilson Borges Jun 08 '17 at 03:23
  • Sorry, How can I install FileInfo extension? I only have access of cpanel. – psuresh Jun 08 '17 at 03:24
  • 1
    It's very likely you'll have to ask your hosting company to do so, unless cpanel allows you to load extra PHP extensions. – Capsule Jun 08 '17 at 03:28
  • @Capsule It is written in php manual that phpinfo extension is enabled by default as of PHP 5.3.0 but my server is already running in PHP Version 5.6.19 http://php.net//manual/en/fileinfo.installation.php – psuresh Jun 08 '17 at 10:36
  • I've seen some cheap hosting companies running PHP on top of IIS or on Windows servers. Make sure this is not the case (that would explain why the extension is disabled). Run a `phpinfo()` in a page on the server to get a better understanding of what is installed and/or enabled – Capsule Jun 09 '17 at 03:57
  • @Capsule I run phpinfo(); It shows system is linux and PHP Version 5.6.19 – psuresh Jun 09 '17 at 05:17
  • Then it's a mystery and you need to investigate with your hosting provider – Capsule Jun 11 '17 at 01:50
  • @SureshPokharel did you fix the problem? – nasor Jan 05 '18 at 09:44
  • @nasor Not yet. Actually, I figured out that I don't have access to enable the fileinfo extension. Please share if you got anything about this? – psuresh Jan 05 '18 at 15:04
  • Try and enable manually from your Cpanel. You will see it where you will select PHP version. Contact your hosting company if you still have the same problem after you enable it manually. – TheLastCodeBender Nov 19 '19 at 03:52

2 Answers2

25

You can enable fileinfo extension from cpanel 1 Go to SOFTWARE=>Select PHP Version=>fileinfo check box and enable fileinfo extension. You can see in image.

Aarej
  • 318
  • 4
  • 13
0

1- Go to your php folder under your server (xammp etc.).
2- Find php.ini file
3- ;extension=php_fileinfo.dll find the line.
4- remove ";" from the line
result : extension=php_fileinfo.dll
5- save file and restart your server and İt should be fixed it all.

Enver
  • 542
  • 5
  • 7