CodeIgniter Forums
Fatal error: Class 'B' not found in ... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Fatal error: Class 'B' not found in ... (/showthread.php?tid=43055)



Fatal error: Class 'B' not found in ... - El Forum - 06-28-2011

[eluser]panos konstantinides[/eluser]
Hello all. I am migrating to CodeIgniter 2.0.2. I have a file A.php

Code:
class A extends CI_Controller {
...
}

class B extends A {
...
}

I have this file in the libraries folder.

Then I have another controller

Code:
class Customer extends B {
...
}

in file customer.php but when I try to load the class Customer I get the following error

"Fatal error: Class 'B' not found in E:\applications\Apache2.2\awebapp\application\controllers\customer.php"

Anyone knows why it can't find my controller? I tried to move it to different locations but to no avail. I have followed this guide for the migration.

And a second question. The guide above states "Replace all files and directories in your "system" folder except your application folder." I did that but I noticed that the application folder in CI 2.0.2 is different from the application folder in my old CI version (it has a few more folders like "core" and "third_party"). Anyone knows what they are and if I need them?

Thanks

Panos


Fatal error: Class 'B' not found in ... - El Forum - 06-29-2011

[eluser]panos konstantinides[/eluser]
Ok I have found the problem. My controller has to go into the "core" folder. So we also need to update the application folder, this is something that the upgrade user guide does not mention. Man, I love concise and up-to-date documents.


Fatal error: Class 'B' not found in ... - El Forum - 06-29-2011

[eluser]Unknown[/eluser]
Wish the user guide did mention it, would have saved me 4 hours. lol


Fatal error: Class 'B' not found in ... - El Forum - 06-30-2011

[eluser]InsiteFX[/eluser]
If you searched the forums you would have found it in two seconds!

InsiteFX