Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dembilesmana's avatar

Failed to install composer and laravel (macports)

Previously I used the hombrew package manager, everything was okay. I reinstalled my iMac, and now I use the Macports package manager.

first I installed the composer and it worked, then installed laravel but failed:

  Problem 1
    - laravel/installer v3.0.1 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - laravel/installer v3.0.0 requires ext-zip * -> the requested PHP extension zip is missing from your system.
    - Installation request for laravel/installer ^3.0 -> satisfiable by laravel/installer[v3.0.0, v3.0.1]

then I installed the latest version of php using macports, but when I installed the laravel I got this message :

Changed current directory to /Users/DELE/.composer

PHP Fatal error:  Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:713
Stack trace:
#0 phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(48): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth('  [Composer\Exc...', 'ASCII')
#1 phar:///Users/DELE/composer.phar/vendor/symfony/console/Helper/Helper.php(54): mb_strwidth('  [Composer\Exc...', 'ASCII')
#2 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(646): Symfony\Component\Console\Helper\Helper::strlen('  [Composer\Exc...')
#3 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///Users/DELE/composer.phar/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringI in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 713

Fatal error: Uncaught Error: Call to undefined function Symfony\Polyfill\Mbstring\iconv() in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php:713
Stack trace:
#0 phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/bootstrap.php(48): Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth('  [Composer\Exc...', 'ASCII')
#1 phar:///Users/DELE/composer.phar/vendor/symfony/console/Helper/Helper.php(54): mb_strwidth('  [Composer\Exc...', 'ASCII')
#2 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(646): Symfony\Component\Console\Helper\Helper::strlen('  [Composer\Exc...')
#3 phar:///Users/DELE/composer.phar/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(Composer\Exception\NoSslException), Object(Symfony\Component\Console\Output\StreamOutput))
#4 phar:///Users/DELE/composer.phar/src/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\StringI in phar:///Users/DELE/composer.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 713

then I tried to reinstall the composer and get this message :

PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Please help.

0 likes
8 replies
dembilesmana's avatar

still gets the same error message when installing composer

PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1

Warning: copy(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: No such file or directory in Command line code on line 1
bobbybouwmann's avatar

@dembilesmana You can easily google these kinds of errors. A ton of people already had issues with this.

It's recommended to install these extensions as well: php73-xml, php7-curl, php7-json, php7-zip. There are a lot more extensions, but you only need them depending on your application.

dembilesmana's avatar

Oh, I forgot to ask, is it different from openssl from php^-openssl, or is it related to each other?

and do I not need to do an extension to php.ini? and is changing the php.ini file recommended? and the php.ini function for what? because before I was browsing and many answers to eliminate the semicolons in extension = openssl. but nothing happened

dembilesmana's avatar

When I was browsing I just got an answer to change the php.ini file but nothing happened.

dembilesmana's avatar

I installed everything but there are still errors

PHP Warning:  copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1

Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1
PHP Warning:  copy(): Failed to enable crypto in Command line code on line 1

Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

dembilesmana's avatar
dembilesmana
OP
Best Answer
Level 1

solved, by installing a few of these packages : php74-curl, php74-mbstring, php74-openssl, php74-posix, php74-zip.

Please or to participate in this conversation.