Welcome Guest, Not a member yet? Register   Sign In
Showing only blank page without errors
#1

[eluser]drale2k[/eluser]
Hi, my CI setup is running at localhost without problems.

I use Windows with XAMPP local. I have uploaded everything to my root and edited all config files. I have no whitespace or something at the end of files and caching and logs are turned off.

I dont get it, it only shows a blank page without any source-code.

domain: www.md5hood.com/

Funny is if i call domain.com/cracker/index it shows blank page ( index exists )

When i call domain.com/cracker/index1234 a blank one comes too (index1234 does not exist)

Its confusing, someone knows what the problem could be?

I am using PHP5 and as said, local no problems.
#2

[eluser]pistolPete[/eluser]
Quote: logs are turned off
Turn it on and see if you get any errors logged.

In general:
Make sure file permissions are set correctly.
Enable error_reporting in index.php. If that doesn't work change your php.ini.
Code:
error_reporting(E_ALL);
Enable db_debug:
Code:
$db['default']['db_debug'] = FALSE;

Do you use a .htaccess file?
#3

[eluser]drale2k[/eluser]
Ok this is the output of the log file. Looks like CI is in an endless loop? I cant see any loop in my code.

Code:
DEBUG - 2009-03-09 18:54:22 --> Config Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Hooks Class Initialized
DEBUG - 2009-03-09 18:54:22 --> URI Class Initialized
DEBUG - 2009-03-09 18:54:22 --> No URI present. Default controller set.
DEBUG - 2009-03-09 18:54:22 --> Router Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Output Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Input Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Global POST and COOKIE data sanitized
DEBUG - 2009-03-09 18:54:22 --> Language Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Loader Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: url_helper
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: html_helper
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: form_helper
DEBUG - 2009-03-09 18:54:22 --> Database Driver Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Config Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Hooks Class Initialized
DEBUG - 2009-03-09 18:54:22 --> URI Class Initialized
DEBUG - 2009-03-09 18:54:22 --> No URI present. Default controller set.
DEBUG - 2009-03-09 18:54:22 --> Router Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Output Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Input Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Global POST and COOKIE data sanitized
DEBUG - 2009-03-09 18:54:22 --> Language Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Loader Class Initialized
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: url_helper
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: html_helper
DEBUG - 2009-03-09 18:54:22 --> Helper loaded: form_helper
DEBUG - 2009-03-09 18:54:22 --> Database Driver Class Initialized
#4

[eluser]sophistry[/eluser]
this can happen if you make a function with the same name as some new PHP native function.

also, triple check your whitespace.
#5

[eluser]drale2k[/eluser]
This is my only controller, i dont see anything may looping. I checked for whitespace too, can there be any Win/Linux incompatibilities ?

Code:
<?php

/*
* @var string $result contains the result as output
* @var string $result_class contains the html <div> result class for the view file
* @var bool $found is TRUE if the hash was found, false by default
* @var bool $found_local is true if the hash was found in our local database, false by default
* @var string $hash contains the hash we are looking for
* @var string $source contains the source where the hash was found (local or remote providers name)
* @var string $table contains the MySQL table we will use
*/

class Cracker extends Controller {
    
    # properties
    
    public $result;
    public $result_class;
    public $found;
    public $found_local;
    public $hash;
    public $source;
    public $table;
    
    # methods
    
    function Cracker()
    {        
        parent::Controller();
        
        $this->found = FALSE;
        $this->found_local = FALSE;
        $this->table = 'md5';
    }
    
    // default
    
    function index()
    {
        $data['title'] = 'Crack Md5 Hood';
        $data['map'] = 'Crack';
        
        $this->load->view('header_view', $data);
        $this->load->view('crack_view');
        $this->load->view('footer_view');
        $this->load->view('analytics_view');
    }
    
    // search the hash using local and remote databases
    
    function crack()
    {
        if($this->input->post('submit'))
        {
            $this->hash = htmlspecialchars($this->input->post('hash'));
            
            if ($this->isMd5($this->hash))
            {
                $this->hash = mysql_escape_string(trim($this->hash));
                
                // local database first
                $this->search_local_db($this->hash);
                
                // if no result at local, check remote
                //  ! list here all remote functions
                $this->hashkiller($this->hash);
                
                // update our database
                $this->update_local_db();
            }
            
            else
            {
                $this->result_class = 'result_false';
                $this->result = 'This is not a valid MD5 Hash.';
            }
        }
        
        $data['title'] = 'Crack Md5 Hood';
        $data['map'] = 'Crack';
        $data['result'] = $this->result;
        $data['result_class'] = $this->result_class;
        $data['hash'] = $this->hash;
        
        $this->load->view('header_view', $data);
        $this->load->view('crack_view', $data);
        $this->load->view('footer_view');
        $this->load->view('analytics_view');
    }
    
    // checks if @param is a valid md5 hash
    
    function isMd5($hash)
    {
        if (preg_match('/[0-9a-fA-F]{32}/', trim($hash)))
        {
            return TRUE;
        }
        
        return FALSE;
    }
    
    // hashkiller.com API
    
    function hashkiller($hash)
    {
        if ($this->found !== TRUE)
        {
            $info = @simplexml_load_file("http://hashkiller.com/api/api.php?md5=".$hash);
            $result = $info->plain[0];
            if (strlen(trim($info->plain[0])) > 0)
            {
                $this->result = mysql_escape_string($info->plain[0]);
                $this->found = TRUE;
                $this->result_class = 'result_true';
                $this->source = 'Hashkiller';
            }
            
            else
            {
                $this->result_class = 'result_false';
                $this->result = 'That hash could not be cracked.';
            }
        }
        
        return FALSE;
    }
    
    // search at our local database
    
    function search_local_db($hash)
    {
        $sql = $this->db->from($this->table)->where('hash', $hash)->get();
        if ($sql->num_rows() > 0)
        {
            $row = $sql->row();
            
            $this->found = TRUE;
            $this->found_local = TRUE;
            $this->result_class = 'result_true';
            $this->result = htmlspecialchars($row->plain);
        }
        
        else
        {
            $this->result_class = 'result_false';
            $this->result = 'That hash could not be cracked.';    
        }
    }
    
    // updates and inserts new data to our local database
    
    function update_local_db()
    {
        if ($this->found == TRUE && $this->found_local == FALSE)
        {            
            $this->db->query("
            INSERT INTO $this->table
                (hash, plain, created, count, source)
            VALUES
                ('$this->hash', '$this->result', NOW(), '1', '$this->source')
            ");
        }
        
        else if($this->found_local = TRUE)
        {
            $this->db->query("UPDATE $this->table SET count = count +1 WHERE hash = '$this->hash'");
        }
    }
}
#6

[eluser]drale2k[/eluser]
This is the Erroor log from CI http://nopaste.com/p/a9GFrPTkN

Please i need help, cant get my site working ;/
#7

[eluser]helmutbjorg[/eluser]
My problem (which looks similar to yours) turned out to be with the .htaccess file.

This is what my htacess file looks like on my localhost which works fine
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|cache|css|icons|javascript|themes|upload|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

But the solution to get it working on the live server (which took ages to figure out!!!)
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|cache|css|icons|javascript|themes|upload|user_guide|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
Note the single question mark added at after index.php in the rewrite rule.

Hope that helps!!




Theme © iAndrew 2016 - Forum software by © MyBB