Welcome Guest, Not a member yet? Register   Sign In
Blank Screen - works ok on home server but not on hosting site
#1

[eluser]deltajam[/eluser]
Getting a blank screen for the site.

Now i have tried echoing and I get to the point where it stops at $this->template->set_template('home');

Anywhere it has $this is where the echo stops

Any body have any ideas what it might be?
#2

[eluser]Xenon Design[/eluser]
Sounds like the error reporting may be turned off and there is a PHP error. This is common with some hosts as it masks information about your system.

If you can read the error_log file for apache/httpd ( generally in /var/log/httpd/error_log but you will need sudo/root permission ), scroll to the last message and see what it is. You can do that if you have SSH access to the server and know your command line foo.

Next thing is to temporarily, only temporarily, set error reporting to all:
Code:
<?php
error_reporting(E_ALL);
?>

You can use that method in index.php or alternatively set it to E_ALL in php.ini, whatever floats your boat.

Check the error and debug. Also other things to cross check are PHP versions on your local test server and the host. If the host has an older version you may come across some version issues depending on how old it is.
#3

[eluser]deltajam[/eluser]
well, turning error reporting on helped. Our CI version in 1.6.3, and PHP version is 4.4.7.

it broke with statements like this:

Code:
function parse_header($page, $link_name)
    {
        $query = $this->db->query("SELECT cat_name, cat_desc FROM categories WHERE cat_url = '$page' AND site_id = 1");
        
          $data = array(
            'cat_name' => $query->row()->cat_name,
            'cat_desc' => $query->row()->cat_desc,
            'link_name' =>  " - " . $link_name,);
        
        $this->template->parse_view('header', 'global/header', $data);
        
    }


Now, the comma you see at the end of the array ... I thought that was tyhe mistake the was crashing. But nope. I get this error, no matter what I do:

Code:
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ')' in {site_path}public_html/v110/system/application/models/header.php on line 17

How can I set the same level of 'sensitivity' for testing on my home server? This is so bizarre. I have one very angry client.
#4

[eluser]Yash[/eluser]
I got and resolve the error in this function

Code:
function parse_header($page, $link_name)
    {
        $query = $this->db->query("SELECT cat_name, cat_desc FROM categories WHERE cat_url = '$page' AND site_id = 1");
        
          $data = array(
            'cat_name' => $query->row()->cat_name,
            'cat_desc' => $query->row()->cat_desc,
            'link_name' =>  " - " . $link_name);  //remove comma before ) ...simple sytax error :)
        
        $this->template->parse_view('header', 'global/header', $data);
        
    }
#5

[eluser]Colin Williams[/eluser]
I think your problem is with $query->row()->cat_name. First, assign a variable to $query->row()

Code:
$row = $query->row();
$data = array(
            'cat_name' => $row->cat_name,
            'cat_desc' => $row->cat_desc,
            'link_name' =>  " - " . $link_name);




Theme © iAndrew 2016 - Forum software by © MyBB