title: CodeIgniter - unable to load requested class
body: <p>Yes, I imagine you are thinking to say that this question is a possible duplicate, however it isn't as the answers for the similar questions do not fix the issue I am currently having.</p>
  
  <p>I'm receiving the following error while autoloading a library named 'phpass' as follows.</p>
  
  <blockquote>
    <p>An Error Was Encountered
    Unable to load the requested class: Phpass</p>
  </blockquote>
  
  <p>Code to autoload the library</p>
  
  <pre><code>$autoload['libraries'] = array('database', 'phpass');
  </code></pre>
  
  <p>The phpass.php file resides in the application/libraries folder, and the class is declared as <code>class phpass</code> meaning that the issue cannot be related to capitalisation or the file path as suggested in the majority of other answers I have come across. </p>
  
  <p>Please can you tell me what I am missing? It works perfectly in MAMP, however, when uploading to my Linux Ubuntu server (Apache2), it stops working.</p>
  
  <p>Thanks,</p>
  
  <p>Max.</p>
  
  <p>Edit--- Constructor method as requested by Utku </p>
  
  <pre><code>class phpass {
  
      protected $PasswordHash;
  
      // default values if config was not found
      protected $iteration_count_log2 = 8;
      protected $portable_hashes = FALSE;
  
      /**
       * Construct with configuration array
       * 
       * @param array $config
       */
      public function __construct($config = array()) {
          // check if the original phpass file exists
          if (!file_exists($path = dirname(__FILE__) . '/../vendor/PasswordHash.php')) {
              show_error('The phpass class file was not found.');
          }
  
          include ($path);
  
          if (!empty($config)) {
              $this-&gt;initialize($config);
          }
  
          // create phpass object
          $this-&gt;PasswordHash = new PasswordHash($this-&gt;iteration_count_log2, $this-&gt;portable_hashes);
      }
  </code></pre>