How to install gmp extension for php 7.2.1 using MAMP on OSX?
I'm trying to encrypt a token with php and this library(lcobucci/jwt) using the Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve and the SHA-256 hash algorithm.
error when running php script:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
Class 'Mdanter\Ecc\EccFactory' not found
I figured that I'm missing the mdanter/ecc
dependicy package, so I tried running the following command.
command running:
composer require mdanter/ecc
output:
mdanter/ecc v0.5.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system
I've tried everything I could find researching this error and related to MAMP. But I couldn't solve this problem. Is there anyone here who has experience in adding the gmp php extension to MAMP specificly and is willing to help me out?
Note: I'm not a very experienced web developer, I mostly create iOS apps and I want to generate a token in php, so I can access the Apple Music Kit API resources.