title: How upgrade PHP extension (Libsodium)
body: <p>I'm using <a href="https://github.com/jedisct1/libsodium-php/" rel="nofollow noreferrer">Libsodium-PHP</a>, and I'm seeing that the <code>ParagonIE_Sodium_Compat::crypto_pwhash</code> function produces different results (with the same arguments) when called from the command line versus when called from within the app running on PHP-FPM.</p>
  
  <p><a href="https://paragonie.com/book/pecl-libsodium/read/00-intro.md" rel="nofollow noreferrer">This tutorial</a> says: </p>
  
  <blockquote>
    <p>Just make sure you install your OS's equivalent of the php7.2-sodium
    package when you're installing PHP, and all these steps should be
    taken care of for you.</p>
  </blockquote>
  
  <p><code>phpinfo();</code> shows:</p>
  
  <pre><code>sodium support  enabled
  sodium compiled version 2.0.12
  libsodium headers version   1.0.11
  libsodium library version   1.0.11
  </code></pre>
  
  <p>But for CLI, it shows:</p>
  
  <pre><code>sodium support =&gt; enabled
  libsodium headers version =&gt; 1.0.16
  libsodium library version =&gt; 1.0.16
  </code></pre>
  
  <p>My assumption is that the differing Libsodium versions could be what is causing the <code>crypto_pwhash</code> function to produce different results.</p>
  
  <p><strong>So how can I upgrade the Libsodium extension from 1.0.11 to 1.0.16?</strong></p>
  
  <p>P.S. I know that the CLI version of <code>crypto_pwhash</code> is producing the output that I want because it matches the output of Libsodium-js (<a href="https://codesandbox.io/s/rjojko4vj4?autoresize=1&amp;expanddevtools=1&amp;hidenavigation=1" rel="nofollow noreferrer">demo fiddle here</a>).</p>