• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible Library bug - Unable to load the requested class

Hello everyone.

I've might found a bug in the library loader. If not, I'd love if someone would point me in the right direction and tell me what I'm doing wrong.

Here's the use scenario:
I've created a class containing the facebook SDK and placed it inside /libraries/facebook/.

Here's what's in this folder:
- Facebook.php - class Facebook -  wrapper for the SDK

This setup is working excellent on my Windows laptop, but when I upload it to my server, I get the error:
"Unable to load the requested class: Facebook".
The class itself is with a big F so both the class name itself and the file has the right characters.

Fyi, my server is running on a unix OS.

This is really strange.
I've tried to change everything to from uppercases to lowercases in the class names and even in the autoloader configurations, but I can't seem to get it to work.

Does anyone here have a clue what might be wrong?

Thanks in advance,

So, you have /libraries/facebook/Facebook.php which you're loading by calling $this->load->library('facebook/facebook')? This should work, as long as:
- your subdirectory (facebook) capitalization matches whatever you used in the call to $this->load->library()
- you used / in the call to $this->load->library() instead of \
- the file is named Facebook.php
- the class is named Facebook

If it's working locally, but not on the server, this is the bulk of the potential issues, as long as the error is coming from the loader attempting to load your library, rather than something in your library trying to load something in the Facebook SDK.

(07-08-2015, 07:07 AM)mwhitney Wrote: Hello,

I am getting same issue while login with Facebook in ci. Can you please help me how can I solved that type kind of issue.
Please see the issue in attachment. and help me ASAP.

Thanks in advance,
Munish Sharma

Attached Files Thumbnail(s)

Which means it cannot find it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.