0

I just trying to run the composer install command for the laravel project. I do have all of these PHP extention in my C:\xampp\php\ext directory, but still that the error shows like below:

PS C:\Users\user\Documents\Test Real\Hantech\OceanAMS> composer install
You are running Composer with SSL/TLS protection disabled.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - Root composer.json requires PHP extension ext-curl * but it is missing from your system. Install or enable PHP's curl extension.
  Problem 2
    - Root composer.json requires PHP extension ext-fileinfo * but it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 3
    - defuse/php-encryption is locked to version v2.3.1 and an update of this package was not requested.
    - defuse/php-encryption v2.3.1 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 4
    - eduardokum/laravel-mail-auto-embed is locked to version 1.0.7 and an update of this package was not requested.
    - eduardokum/laravel-mail-auto-embed 1.0.7 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
  Problem 5
    - facade/ignition is locked to version 2.17.6 and an update of this package was not requested.
    - facade/ignition 2.17.6 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
  Problem 6
    - intervention/image is locked to version 2.7.2 and an update of this package was not requested.
    - intervention/image 2.7.2 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 7
    - laravel/framework is locked to version v8.83.22 and an update of this package was not requested.
    - laravel/framework v8.83.22 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 8
    - lcobucci/jwt is locked to version 4.1.5 and an update of this package was not requested.
    - lcobucci/jwt 4.1.5 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 9
    - league/flysystem is locked to version 1.1.9 and an update of this package was not requested.
    - league/flysystem 1.1.9 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 10
    - league/mime-type-detection is locked to version 1.11.0 and an update of this package was not requested.
    - league/mime-type-detection 1.11.0 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 11
    - league/oauth1-client is locked to version v1.10.1 and an update of this package was not requested.
    - league/oauth1-client v1.10.1 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 12
    - league/oauth2-server is locked to version 8.3.5 and an update of this package was not requested.
    - league/oauth2-server 8.3.5 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 13
    - phpoffice/phpspreadsheet is locked to version 1.24.1 and an update of this package was not requested.
    - phpoffice/phpspreadsheet 1.24.1 requires ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
  Problem 14
    - robrichards/xmlseclibs is locked to version 3.1.1 and an update of this package was not requested.
    - robrichards/xmlseclibs 3.1.1 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 15
    - rollbar/rollbar is locked to version v2.1.0 and an update of this package was not requested.
    - rollbar/rollbar v2.1.0 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
  Problem 16
    - tecnickcom/tc-lib-barcode is locked to version 1.17.14 and an update of this package was not requested.
    - tecnickcom/tc-lib-barcode 1.17.14 requires ext-gd * -> it is missing from your system. Install or enable PHP's gd extension.
  Problem 17
    - composer/ca-bundle is locked to version 1.3.5 and an update of this package was not requested.
    - composer/ca-bundle 1.3.5 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
  Problem 18
    - php-webdriver/webdriver is locked to version 1.12.1 and an update of this package was not requested.
    - php-webdriver/webdriver 1.12.1 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
  Problem 19
    - laravel/framework v8.83.22 requires ext-openssl * -> it is missing from your system. Install or enable PHP's openssl extension.
    - nunomaduro/larastan 1.0.4 requires illuminate/console ^6.0 || ^7.0 || ^8.0 || ^9.0 -> satisfiable by laravel/framework[v8.83.22].
    - nunomaduro/larastan is locked to version 1.0.4 and an update of this package was not requested.

I am also sure that the curl is already enabled on my system by seeing at http://localhost/dashboard/phpinfo.php enter image description here in my machine.

My machine is: Win 10 64 bit PHP Version 8.0.28 Composer version 2.6.1

  • 2
    The web service PHP and the command line PHP have different configuration files, so it's possible (likely, even) that curl is enabled for the web but not for the CLI. Run `php --ini` from the command line to see what configuration file it's using. – Alex Howansky Sep 02 '23 at 15:13
  • PHP Warning: PHP Startup: Unable to load dynamic library 'zip' (tried: C:\xampp\php\ext\zip (The specified module could not be found), C:\xampp\php\ext\php_zip.dll (%1 is not a valid Win32 application)) in Unknown on line 0 Warning: PHP Startup: Unable to load dynamic library 'zip' (tried: C:\xampp\php\ext\zip (The specified module could not be found), C:\xampp\php\ext\php_zip.dll (%1 is not a valid Win32 application)) in Unknown on line 0 PHP Warning: Module "openssl" is already loaded in Unknown on line 0 – aldoprogrammer Sep 02 '23 at 15:40
  • Warning: Module "openssl" is already loaded in Unknown on line 0 Configuration File (php.ini) Path: Loaded Configuration File: C:\xampp\php\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none) – aldoprogrammer Sep 02 '23 at 15:40
  • It returns me this now – aldoprogrammer Sep 02 '23 at 15:40
  • i added the path of `C:\xampp\php\ext` to my windows, and now it gives me Configuration File (php.ini) Path: Loaded Configuration File: (none) Scan for additional .ini files in: (none) Additional .ini files parsed: (none) – aldoprogrammer Sep 02 '23 at 15:51

1 Answers1

0

So I found my own solution, so that i was installing the php using the non-thread safety, which this causes the problem since according to this answer, it says if you install PHP as an Apache module in a worker MPM (multi-processing model) then you should use the thread-safety one.

You can checking the php on your machine using thread-safety or non-thread-safety by running the php -v, it will tell you at the end of the php version. If it's (ZTS) indicates that it was built with Thread Safety (ZTS) support, but if it's Non-Thread Safety (NTS) that means not thread safety.

Below is the example:

  • Thread safety
    PHP 8.0.25 (cli) (built: Oct 25 2022 10:49:29) ( ZTS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.25, Copyright (c) Zend Technologies

  • Non - Thread safety
    PHP 8.0.25 (cli) (built: Oct 25 2022 10:49:29) ( TS Visual C++ 2019 x64 ) Copyright (c) The PHP Group Zend Engine v4.0.25, Copyright (c) Zend Technologies