php - CodeIgniter - unable to load requested class -


yes, imagine thinking question possible duplicate, isn't answers similar questions not fix issue having.

i'm receiving following error while autoloading library named 'phpass' follows.

an error encountered unable load requested class: phpass

code autoload library

$autoload['libraries'] = array('database', 'phpass'); 

the phpass.php file resides in application/libraries folder, , class declared class phpass meaning issue cannot related capitalisation or file path suggested in majority of other answers have come across.

please can tell me missing? works in mamp, however, when uploading linux ubuntu server (apache2), stops working.

thanks,

max.

edit--- constructor method requested utku

class phpass {      protected $passwordhash;      // default values if config not found     protected $iteration_count_log2 = 8;     protected $portable_hashes = false;      /**      * construct configuration array      *       * @param array $config      */     public function __construct($config = array()) {         // check if original phpass file exists         if (!file_exists($path = dirname(__file__) . '/../vendor/passwordhash.php')) {             show_error('the phpass class file not found.');         }          include ($path);          if (!empty($config)) {             $this->initialize($config);         }          // create phpass object         $this->passwordhash = new passwordhash($this->iteration_count_log2, $this->portable_hashes);     } 

i think capitalisation of file name , class name issue, according user guide:

  • phppass.php should phppass.php
  • class phpass should class phpass

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -