Welcome Guest, Not a member yet? Register   Sign In
Using Model Method Causes White Page
#1

[eluser]ElBonzi[/eluser]
I had an application running fine on my local machine, but when I transferred it to my online server I suddenly get a white page when loading my index.

I narrowed everything down to my models, and found that when using any methods within my models I get this white page. For example:

Code:
$production->$i->wkOffProduce = $solarSize * $this->M_radiance->getDays($i,'wkOff')->numdays * $this->M_radiance->getHours($i,'wkOff')->hours;

When I remove it from my controller everything seems to work, even though it's not in the method being loaded (index()), any ideas?
#2

[eluser]stuffradio[/eluser]
Try turning logging on and look at what error is being produced.
#3

[eluser]ElBonzi[/eluser]
Error logging is on but for some reason is not showing me anything on page. Is there something special I have to do to get logs written to a file?
#4

[eluser]stuffradio[/eluser]
It saves to the system/application/logs folder.
#5

[eluser]ElBonzi[/eluser]
These are the only logs that come out unfortunately. Doesn't look like anythings up?

DEBUG - 2011-01-13 16:23:34 --> Config Class Initialized
DEBUG - 2011-01-13 16:23:34 --> Hooks Class Initialized
DEBUG - 2011-01-13 16:23:34 --> URI Class Initialized
DEBUG - 2011-01-13 16:23:34 --> No URI present. Default controller set.
DEBUG - 2011-01-13 16:23:34 --> Router Class Initialized
DEBUG - 2011-01-13 16:23:34 --> Output Class Initialized
DEBUG - 2011-01-13 16:23:34 --> Input Class Initialized
DEBUG - 2011-01-13 16:23:34 --> Global POST and COOKIE data sanitized
DEBUG - 2011-01-13 16:23:34 --> Language Class Initialized
#6

[eluser]stuffradio[/eluser]
Did you turn on Debug only logging or did you set logging to all?
#7

[eluser]ElBonzi[/eluser]
I set $config['log_threshold'] = 4 in application/config
#8

[eluser]stuffradio[/eluser]
What is
Code:
$production
? if that is a model, that is probably where your issue lies.
#9

[eluser]ElBonzi[/eluser]
$production is just an stdClass. I was using it to store a bunch of data produced by my models since it goes about 3 levels deep.
#10

[eluser]stuffradio[/eluser]
For these
Code:
$this->M_radiance->getDays($i,'wkOff')->numdays
Try something like this
Code:
$yourvar = $this->M_radiance->getDays($i,'wkOff');
And then in that line you can use
Code:
$yourvar->numdays;
instead of the long tails you have. That might solve it.




Theme © iAndrew 2016 - Forum software by © MyBB