Welcome Guest, Not a member yet? Register   Sign In
Library - class file was not found - How to track error

How do i go about tracking the message - "class file was not found"

For this particular case,

I am using PhPass library - pasted that in the libraries folder.
then I am calling it like this:

$password = $this->phpass->hash($password);

the library is definitely getting loaded (or else i would have a library not found error)

rather i am getting the error:

"class phpass not found."

I can clearly see the class defined in the aforesaid library but i still get this message.

Any suggestions, thanks Smile

Sort of bumping this.. but I have taken all care for creating library

1) Used uppercase for file name & class name.
2) Created a file called Phpass.php in application/library
3) Phpass.php contains a class Phpass which has a method hash($password)

but these two lines:

$password = $this->phpass->hash($password);

still give the error:

Quote:The phpass class file was not found.

What am i doing wrong ?
stuck here for the last 4 hours - pls pls pls help

Not sure if you made a typo or not, but the library folder should be /application/libraries/ NOT library.

Check permissions to make sure the folder has read access.

@Aken - thanks for replying - the actual folder is /application/libraries

I mentioned it wrong in this thread - my fault. But I am still stuck Sad

i am not onn my pc - but will do a class_exists check later and report. Anyother way ?

thanks once again

Finally got it working: posting it here should some one get the same error.

You have to create a folder named vendor and add the library dependency there.
I had forgot to add this.

That's not required to create a simple library - must have something to do with the PHPass class, and any dependencies it needs. Just a clarification for those creating their own libraries.

Theme © iAndrew 2016 - Forum software by © MyBB