title: PHP Sodium not installed?
body: <p>I'm trying to use Libsodium for the first time to for encryption, but I've encountered an error. I'm running everything on XAMPP; sodium is in the /ext/ folder and I've added <code>extension=sodium</code> to the php.ini file.</p>
  <p>This is my code.</p>
  <pre class="lang-php prettyprint-override"><code>// This refers to the previous code block.
  require &quot;safeCrypto.php&quot;; 
  
  // Do this once then store it somehow:
  $key = random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
  $message = 'We are all living in a yellow submarine';
  
  $ciphertext = safeEncrypt($message, $key);
  $plaintext = safeDecrypt($ciphertext, $key);
  
  echo $ciphertext;
  echo $plaintext;
  echo phpversion();
  </code></pre>
  <p>It throws this error.</p>
  <blockquote>
  <p><b>Warning</b>:  Use of undefined constant SODIUM_CRYPTO_SECRETBOX_KEYBYTES - assumed 'SODIUM_CRYPTO_SECRETBOX_KEYBYTES' (this will throw an Error in a future version of PHP) in <b>D:\xampp\htdocs\php\crypttest.php</b> on line <b>6</b><br />
  <b>Fatal error</b>:  Uncaught TypeError: random_bytes() expects parameter 1 to be integer, string given in D:\xampp\htdocs\php\crypttest.php:6</p>
  </blockquote>
  <p><code>get_loaded_extensions()</code> shows that sodium is NOT installed, and I can't figure out why. The <em>php_sodium.dll</em> file  exists in the ext folder and I've added <code>extension=sodium</code> in the php.ini file.</p>
  <p>I'm using PHP 7.2.10.</p>