title: How to install gmp extension for php 7.2 using MAMP on OSX
body: <blockquote>
    <p>How to install gmp extension for php 7.2.1 using <a href="https://www.mamp.info/en/" rel="noreferrer">MAMP</a> on OSX?</p>
  </blockquote>
  
  <p>I'm trying to encrypt a token with php and this library(<a href="https://github.com/lcobucci/jwt" rel="noreferrer">lcobucci/jwt</a>) using the Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve and the SHA-256 hash algorithm. </p>
  
  <p><strong>error when running php script:</strong></p>
  
  <pre><code>Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
  Class 'Mdanter\Ecc\EccFactory' not found
  </code></pre>
  
  <p>I figured that I'm missing the <code>mdanter/ecc</code> dependicy package, so I tried running the following command.</p>
  
  <p><strong>command running:</strong></p>
  
  <pre><code>composer require mdanter/ecc
  </code></pre>
  
  <p><strong>output:</strong></p>
  
  <pre><code>mdanter/ecc v0.5.0 requires ext-gmp * -&gt; the requested PHP extension gmp is missing from your system
  </code></pre>
  
  <p>I've tried everything I could find researching this error and related to MAMP. But I couldn't solve this problem. <strong>Is there anyone here who has experience in adding the gmp php extension to MAMP specificly and is willing to help me out?</strong></p>
  
  <p>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.</p>