Welcome Guest, Not a member yet? Register   Sign In
White screen and its magical solution
#1

[eluser]#1313[/eluser]
This is my first time seeing such strange things happen. Pure magick.

I had a stable and running CI application which used Views library. A few hours ago i decided to leave it and start using Rick Ellis' solution to templating (http://ellislab.com/forums/viewthread/44916/). I successfully moved my back-office to this new 'templating technique'. Then i started moving my news section, and then magic happened.

The index() function of my News() controller ends with
Code:
$data['page']['title'] = 'News page';
        $data['view'] = 'news/news-view';
        $this->load->vars($data);
        $this->load->view('page');

and page.php view is
Code:
<?php
$this->load->view('header-part');
$this->load->view($view);
$this->load->view('footer-part');
?>
Quite simple and self-explaining. And it is working fine on my back-end. But on my news page it gave me white screen (with normal profiling info, because i have Profiler enabled). I checked everything ten times, fixed a few bugs, but didn't scratch this white screen at all. I put some debug info into page.php view but it didn't show, so i assume this view was not loading at all.

Then in desperation i added
Code:
ini_set('error_reporting','E_ALL');
line to constructor of my News class and immediately received second dose of pure magick, because white screen just -- well, fixed itself and my page showed okay.

I received NO error messages, none at all. When i delete this ini_set line the white screen immediately returns. WTF?

Here is my News controller.
Code:
<?php

class News extends Controller {

    function News() {

        parent::Controller();
        ini_set('error_reporting','E_ALL');
                // pure magick
        if ($this->config->item('enable_benchmarking')) $this->output->enable_profiler(TRUE);

    }

...
Please share your thoughts on this matter. I feel really stupid and i hope that this is a result of my mistake, because i don't believe in magic, in PHP especially. Please help!


Messages In This Thread
White screen and its magical solution - by El Forum - 08-29-2007, 08:24 AM
White screen and its magical solution - by El Forum - 08-29-2007, 08:49 AM
White screen and its magical solution - by El Forum - 08-29-2007, 08:57 AM
White screen and its magical solution - by El Forum - 08-29-2007, 09:07 AM
White screen and its magical solution - by El Forum - 08-30-2007, 12:06 AM
White screen and its magical solution - by El Forum - 08-30-2007, 09:00 AM
White screen and its magical solution - by El Forum - 08-30-2007, 09:13 AM
White screen and its magical solution - by El Forum - 08-30-2007, 11:29 AM
White screen and its magical solution - by El Forum - 08-31-2007, 12:11 AM
White screen and its magical solution - by El Forum - 08-31-2007, 08:42 AM
White screen and its magical solution - by El Forum - 08-31-2007, 08:45 AM
White screen and its magical solution - by El Forum - 08-31-2007, 09:03 AM
White screen and its magical solution - by El Forum - 09-04-2007, 08:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB