CodeIgniter Forums
Custom Controller deployment issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Custom Controller deployment issue (/thread-32572.html)



Custom Controller deployment issue - El Forum - 07-27-2010

[eluser]bertd[/eluser]
Hi guys,

I'm currently having the following issue and I was hoping someone could help me out:


I have made a custom controller that is based on the original codeigniter controller. This file is placed in <app dir>/system/application/libraries/bdcontroller.php and begins like this:

Code:
&lt;?PHP
class BDController extends Controller
{
...

Then, when I have my controllers in the <app dir>/system/application/controllers/ directory, I create them like this:
Code:
&lt;?php
class SignIn extends BDController
{
...

This way, I can implement some basic stuff that I need in each controller in the BDController file, and that code then becomes usable in every controller that inherits from BDController.

This works like a charm on my local mac (10.6.3 with Apache 2.2, PHP 5.3.1)! No issues whatsoever


Now, I've finished my project and I have uploaded it to my hosting (one.com) but now my controllers can't seem to find the BDController file:
Quote: Fatal error: Class 'BDController' not found in <app dir>/system/application/controllers/signin.php on line 2

Line 2 being:
Code:
class SignIn extends BDController

My code works perfectly on my local mac but does not on the one.com hosting (which is running on PHP 5.3.2, there should not be any big changes compared to the 5.3.1 I run locally) and I have absolutely no idea why. Maybe somebody can help me? Any ideas?


Thanks a million!!!


Custom Controller deployment issue - El Forum - 07-27-2010

[eluser]danmontgomery[/eluser]
Did you change:

Code:
$config['subclass_prefix'] = 'MY_';

in config/config.php?


Custom Controller deployment issue - El Forum - 08-31-2010

[eluser]bertd[/eluser]
Woops, This is an old thread, and I forgot to post my solution:

I did change the subclass_prefix, but the problem was with the Case-Sensitivity on my hosting server.
I use Mac OS X with a case-insensitive HFS+ formatting, and I named my files all lowercase. They should be named exactly like you define them! That did the trick!

Gr.,
Bert