How to Fix Unable to Load the Requested Class Error in Codeigniter

This happens when you deploy your application in a linux server machine. Since it's caps sensitive:

Paypal_Lib is different from Paypal_lib.

If you will look at magento's libraries/Loader.php code:

Line: 759


$baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;


You will notice the ucfirst which converts Paypal_Lib to Paypal_lib.

Solution: Just rename Paypal_Lib.php to Paypal_lib.php

:-)

1 Comments

  1. Yep, this fixed my problem, I had some custom libraries and was working on a local Windows server, after deploying on a Linux server, I had this problem. Thanks!

    ReplyDelete

Post a Comment

Post a Comment

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →