Welcome Guest, Not a member yet? Register   Sign In
Site gives blank screen on localhost
#1

[eluser]martillo[/eluser]
I am a newcomer so this may be a stupid question.

I have a site working on a remote server. I want a local copy so have copied the site to localhost.

I have changed config.php file to contain

$config['base_url'] = "http://localhost/";

I have changed database.php file to contain

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";

Apart from that, no changes. The local site only ever gives a white blank screen.

The error log gets as far as:

DEBUG - 2009-01-02 12:15:53 --> Loader Class Initialized
DEBUG - 2009-01-02 12:15:53 --> Database Driver Class Initialized

Then nothing

Any ideas?

Thanks
#2

[eluser]umefarooq[/eluser]
hi
check you base URL again if u put CI application in your web server's root directory than your base url should be like as it is as u have

config[‘base_url’] = “http://localhost/”;

if not means your application is under sub directory than your site URL should be like

config[‘base_url’] = “http://localhost/site_directory/”;

try this hope this will work
#3

[eluser]martillo[/eluser]
Thanks but the site is in the root directory, - although I have tried various other directories in case this makes a difference.
#4

[eluser]sophistry[/eluser]
different PHP versions or OSes on the remote and local machines?
#5

[eluser]martillo[/eluser]
Running locally: Apache server on Windows, PHP 5, MySQL database

Running remotely: CGI server on Linux, PHP 4, MySQL database.



I can get codeigniter to work on my local machine using the example welcome message and controller that comes with the codeigniter download. But when I downlaod the site from the remote - just a blank screen.
#6

[eluser]Pascal Kriete[/eluser]
It's probably a PHP 5 function somewhere.

A blank page is usually a suppressed error, so start turning on error reporting and make sure display_errors is set to on:
Code:
// at the top of index.php:
error_reporting(E_ALL);
ini_set('display_errors', 1);
#7

[eluser]martillo[/eluser]
The only error log I can find is in system/logs

It shows

DEBUG - 2009-01-02 14:31:47 --> Config Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Hooks Class Initialized
DEBUG - 2009-01-02 14:31:47 --> URI Class Initialized
DEBUG - 2009-01-02 14:31:47 --> No URI present. Default controller set.
DEBUG - 2009-01-02 14:31:47 --> Router Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Output Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Input Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Global POST and COOKIE data sanitized
DEBUG - 2009-01-02 14:31:47 --> Language Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Loader Class Initialized
DEBUG - 2009-01-02 14:31:47 --> Database Driver Class Initialized

Then nothing.

The site works on php4 not on php 5.

Are there any more error logs?

Is there a way i can trace code execution? Sorry if that is a daft question. I am new..
#8

[eluser]martillo[/eluser]
It seems to stop processing in codeigniter.

On line 196 of codeigniter. php I have added the following statements

echo "Here";
$CI = new $class();
echo "Here Here";

I get Here

But not Here Here.
#9

[eluser]sophistry[/eluser]
this happened to me when i moved from 4 to 5 and it was a function name collision. make sure your existing php functions do not collide with native php5 functions.

here's the thread: http://ellislab.com/forums/viewthread/45919/

could be it...
#10

[eluser]martillo[/eluser]
Any ideas on how to find which function name conflicts? I have tried to trace the code in loader.php but not much luck there




Theme © iAndrew 2016 - Forum software by © MyBB