How can I identify where Yii application execution is ending?


(jamess07) #1

Prerequisites: Running on Ubuntu. Using Apache. Yii version is printing 1.1.2.

My question:

I’m helping a friend out with a web app where his application developer abruptly quit. The problem is, I’m somewhat green with PHP and COMPLETELY green with Yii. I’m having a difficult time setting up a test server using the existing code. What’s happening is the index.php code calls a CWebApplication-derived class, but the run() method never returns, and all I get is a blank page (this obviously doesn’t happen in production). I’m trying to understand how to identify what’s happening, and where the execution is just dying.

First, let me say that I ran http:///yii/requirements/index.php, and the requirements checker claimed I had the minimum requirements to run.

Second, my index.php looks like this:

ini_set('display_errors',1);

// change the following paths if necessary
$yii=dirname(__FILE__).'/yii/framework/yii.php';
$config=dirname(__FILE__).'/protected/config/main.php';
$gapi = dirname(__FILE__) . '/protected/vendors/Google/autoload.php';

// remove the following lines when in production mode
defined('YII_DEBUG') or define('YII_DEBUG',true);
// specify how many levels of call stack should be shown in each log message
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

require_once($gapi);
require_once($yii);
/*
 * Manage URL Uppercase or lowercase
 */

$manage_url_path = dirname(__FILE__) . '/protected/components/ManageUrl.php';
require_once( $manage_url_path );
$create_web_application = new ManageUrl($config);
$create_web_application->run();

When $create_web_application->run() executes, it never returns (printing after it prints nothing), and I get just a blank page.

This class (ManageUrl) overrides createController, but so far it feels like execution never makes it to this function. Placing any print() statements in there shows nothing. $Yii::log() also shows nothing. There’s nothing in the application.log under /runtime. Apache’s error logs are showing nothing too. It’s as if code execution is just going into a black hole.

One final thing to note: I’ve got mod_rewrite enabled on the server. I followed this outdated howto on DigitalOcean to get things started. Can you advise me on how to figure out what’s going on with this application and why I just get a blank page? I need to figure out where the code execution is going and subsequently dying.

Thanks & Regards
Ask for AOL Help


(Alexander Makarov) #2

Check logs in /runtime/logs.