How to resolve this error when installing Composer?

#1

I am trying to install Composer but after selecting the path I am getting the below error.

The PHP exe file you specified did not run correctly:
D:\xampp\php\php.exe

The php.ini used by your command-line PHP is: D:\xampp\php\php.ini

A duplicate setting in your php.ini could be causing the problem.

Program Output:
PHP Warning: Module ‘mysqli’ already loaded in Unknown on line 0

#2

look if mysqli is loaded twice in your php.ini

#3

I removed it but still I am getting the error when installing through cmd “composer install”
D:\xampp\php>composer install
Loading composer repositories with package information

[Composer\Downloader\TransportException]
The “https://repo.packagist.org/packages.json” file could not be downloaded: php_network_getaddresses: getaddrinfo
failed: No such host is known.
failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.

install [–prefer-source] [–prefer-dist] [–dry-run] [–dev] [–no-dev] [–no-custom-installers] [–no-autoloader] [–no-scripts] [–no-progress] [–no-suggest] [-v|vv|vvv|–verbose] [-o|–optimize-autoloader] [-a|–classmap-authoritative] [–apcu-autoloader] [–ignore-platform-reqs] [–] []…

#4

Can anybody help me to resolve this?