On my WAMP box, I did the following:
Foo
$autoload['libraries'] = array('foo');
Everything works fine. When I upload to my LAMP box, I get the following error:
Unable to load the requested class: foo
Permission of /application/libraries/Foo.php is 0755. Owner is the same as the rest of the CI files. Taking foo
out from autoload makes the problem go away.
Any ideas what might be wrong?
In Windows, capitalization in paths doesn't matter. In Linux it does.
When you autoload, use "Foo" not "foo".
I believe that will do the trick.
I think it works when you take it out of autoloading because codeigniter is smart enough to figure out the capitalization in the path and classes are case independent in php.
I had a similar issue when deploying from OSx on my local to my Linux live site.
It ran fine on OSx, but on Linux I was getting:
An Error Was Encountered
Unable to load the requested class: Ckeditor
The problem was that Linux paths are apparently case-sensitive so I had to rename my library files from "ckeditor.php" to "CKEditor.php".
I also changed my load call to match the capitalization:
$this->load->library('CKEditor');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With