Search code examples
phplinuxwindowscodeigniterexception

CodeIgniter Message: "Class not found" on live server


After pushing our local CodeIgniter environment (Windows) to a test server (Linux) we've ran into the following Exception:

An uncaught Exception was encountered
 Type: Error
 Message: Class 'ManagementStatus' not found
 Filename: ../LO_MaintenanceItem.php
 Line Number: 300
 Backtrace:
 File: ../LO_MaintenanceItem.php
 Line: 34
. . . 

In this case 'ManagementStatus' is a model that extends LODatamapper, as defined here:

class ManagementStatus extends LODataMapper
{
    . . . .
}

In turn, LODataMapper is a class that extends DataMapper, as defined here:

abstract class LODataMapper extends DataMapper
{    . . . 

What we've tried

Any idea what else we might try / what might be going on?


Solution

  • Please check the capitalization on your models. This is most likely your issue. Only the first letter in the filename can be a capital.