Welcome Guest, Not a member yet? Register   Sign In
Problem Exending A Controller
#1

[eluser]Unknown[/eluser]
This is a very strange problem that took me several hours to workaround. I am wondering what could be the root cause of the issue.

Right now I have two controllers, lets call them Car and Honda

Class Car extends Controller {...}

and

Class Honda extends Car {...}

on my local machine (Mac, Apache, PHP 5.2.5, MySQL) everything works fine. I can call MyTestSite.com/Honda/create and a form appears. However, when I uploaded this to my live server (Linux, Apache, PHP 5.2.6, MySQL), and I make the same request MyLiveSite.com/Honda/create I basically get shown junk. It shows parts of my site without css (the base_url() is not getting called) and displays a string that no longer exists in my code base (I have searched).

So my workaround was to duplicate the Car class (lets call it Car2) and let the Honda class extend Car2, so we now have three classes:

Class Car extends Controller {...}

Class Car2 extends Controller {...} <-- the code is cut and pasted from the Car class

Class Honda extends Car2 {...}

For some unknown reason to me, calling MyLiveSite.com/Honda/create now shows the correct form.

I honestly have no idea what is going on, and my logs are not showing me anything (I even added some log_message commands). Does anyone have an idea what could be causing this issue and what I can do about it?

To make this even more fun, when someone requests MyLiveSite.com/Honda/create, before the fix that is, it would send me around 7 blank emails. These emails are in someway related to the FreakAuth component.

Thanks in advance!!




Theme © iAndrew 2016 - Forum software by © MyBB