title: problem with mcrypt installation
body: <p>I've asked the system admins to install <em>mcrypt</em> on the server, and they say everything is OK. But when I run my simple script I get this.</p>
  
  <blockquote>
    <p>Warning: mcrypt_get_iv_size() [function.mcrypt-get-iv-size]: Module initialization failed</p>
  </blockquote>
  
  <p>It's coming from this line:</p>
  
  <pre><code>$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256,MCRYPT_MODE_ECB);
  </code></pre>
  
  <p>Now, from this code:</p>
  
  <pre><code>$algorithms = mcrypt_list_algorithms("/usr/local/bin/mcrypt");
  
  foreach ($algorithms as $cipher) {
      echo "$cipher&lt;br /&gt;\n";
  } 
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Warning: mcrypt_list_algorithms() [function.mcrypt-list-algorithms]: No algorithms found in module dir </p>
  </blockquote>
  
  <p>When I run this:</p>
  
  <pre><code>$modes = mcrypt_list_modes("/usr/local/bin/mcrypt");
  
  foreach ($modes as $mode) {
      echo "$mode &lt;br /&gt;\n";
  }
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Warning: mcrypt_list_modes() [function.mcrypt-list-modes]: No modes found in module dir</p>
  </blockquote>
  
  <p>However, running this command this command</p>
  
  <pre><code>which mcrypt; mcrypt -v
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>/usr/local/bin/mcrypt
  Mcrypt v.0.9.9 (x86_64-unknown-linux-gnu)
  Linked against libmcrypt v.2.5.7
  Copyright (C) 1998-2002 Nikos Mavroyanopoulos (nmav@gnutls.org)
  </code></pre>
  
  <p>Is <em>mcrypt</em> installed/configured correctly? </p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>I did this:</p>
  
  <pre><code>whereis libmcrypt
  </code></pre>
  
  <p>...and got the result:</p>
  
  <pre><code>libmcrypt: /usr/local/lib/libmcrypt /usr/local/lib/libmcrypt.so /usr/local/lib/libmcrypt.la
  </code></pre>
  
  <p>I've also changed:</p>
  
  <pre><code>$modes = mcrypt_list_modes("/usr/local/bin/mcrypt");
  </code></pre>
  
  <p>to...</p>
  
  <pre><code>$modes = mcrypt_list_modes("/usr/local/lib/libmcrypt");
  $algorithms = mcrypt_list_algorithms("/usr/local/lib/libmcrypt");
  </code></pre>
  
  <p>As recommended, but still get the error:</p>
  
  <blockquote>
    <p>Warning: mcrypt_list_modes() [function.mcrypt-list-modes]: No modes found in module dir in</p>
  </blockquote>
  
  <p>Then I went into the file manager in my CPanel to <code>/usr/local/lib/libmcrypt</code>. The directory exists but it has no files in it...</p>
  
  <p><a href="http://img407.imageshack.us/img407/7651/libmcryptempty.jpg" rel="noreferrer">Here is the print screen of the file manager.</a> </p>
  
  <p>Thanks.</p>