views:

24

answers:

2

I'm trying to copy a site built on ZF from production to a localhost environment. All files and db contents were copied but I just get a blank screen. No errors, nothing

Changes made in config.ini I added an entry for development:production

general.host = "localhost:8888"
db.adapter = PDO_MYSQL
db.params.host = localhost:8888
db.params.username = bla
db.params.password = bla
db.params.dbname = db_name

bootstrap.php

$frontController->registerPlugin(new Initializer('development'));

.htaccess contains a few basic directives but if I put some random stuff at the top I don't get Internal server errors so I don't think it even reaches the .htaccess stage.

Did I miss some kind of configuration somewhere?

EDIT:

I have code below in my bootstrap but still get a blank page. Very quickly, it barely loads at all

$frontController->registerPlugin(new Initializer('development'));    

$frontController->throwExceptions(true);

// Dispatch the request using the front controller. 
try {
    $frontController->dispatch();
}
catch (Exception $exception)
{
exit($exception->getMessage());

}

A: 

Try adding this line before running dispatch() on front controller object.

$frontController->throwExceptions(true);

On production systems throwing exceptions is almost always disabled, enabling it on dev could tell you more about the nature of the problem.

RaYell
A: 

Yes, you probably missed some configuration.

Try setting display_errors=On in php.ini. You should be able to see what is going on.

Also, like suggested - try putting $frontController->throwExceptions(true) before calling dispatch().


Regarding the .htaccess file - you need to put the AllowOverride All (or anything valid, other than None) in your apache.conf/vhosts config.

Emil Ivanov
Could you specify what exactly goes where in the .conf file? It's a clean .conf file in a MAMP installation and there seems to be a vhosts section all the way at the bottom: # NameVirtualHost *?
stef
display_errors = On was already the case
stef