How can i resolve the enable the extensions in php.ini?

2.2k views Asked by At

I am trying to install voyager package in Laravel application (The project is created on the WAPP Stack in Alibaba Cloud ECS instance) it throws me a like it is unable to install the package, Please enable the extensions in the php.ini but it is already enabled. Please help me to resolve this... Thanks in advance...

enter image description here

1

There are 1 answers

0
Namoshek On BEST ANSWER

If you think the error is a false-positive and you are sure the fileinfo PHP extension is really both, installed and enabled, you can force the composer installation in two ways:

  1. You can use the --ignore-platform-reqs option when calling composer install. It will ignore dependencies that start with ext-, meaning it will not check if they are resolvable. It will also not check the available PHP version.
  2. You can simulate an environment to composer by adding a special platform configuration in your composer.json under the config key:

    {
       ... other composer settings ...
       "config": {
         "platform": {
            "ext-fileinfo": "1.0"
         }
       }
    }