如何确定Yii应用程序执行的结束位置?

时间:2019-03-09 17:45:13

标签: yii

先决条件:在Ubuntu上运行。使用Apache。 Yii版本正在打印1.1.2。

我的问题:

我正在通过Web应用程序帮助一位朋友,他的应用程序开发人员突然退出了。问题是,我的PHP有点绿色,而Yii的COMPLETELY有点绿色。我很难使用现有代码来设置测试服务器。发生了什么事,index.php代码调用了CWebApplication派生的类,但是run()方法从不返回,我得到的只是一个空白页(这显然在生产中没有发生)。我试图了解如何识别正在发生的事情,以及执行死于何处。

首先,让我说我运行了http:///yii/requirements/index.php,并且需求检查器声称我具有运行的最低需求。

第二,我的index.php看起来像这样:

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();

执行$ create_web_application-> run()时,它永远不会返回(在不打印任何内容后打印),而我只有空白页。

此类(ManageUrl)覆盖了createController,但到目前为止,感觉好像执行从未使该函数执行此操作。在其中放置任何print()语句都不会显示任何内容。 $ Yii :: log()也什么也没显示。 / runtime下的application.log中没有任何内容。 Apache的错误日志也没有显示任何内容。好像代码执行只是陷入了一个黑洞。

最后需要注意的一件事:我在服务器上启用了mod_rewrite。我在DigitalOcean上按照过时的方法进行操作(https://www.digitalocean.com/community/tutorials/how-to-install-and-setup-yii-php-framework-on-ubuntu-12-04)。

您能建议我如何弄清楚此应用程序是怎么回事,为什么我只能得到空白页吗?我需要找出代码执行的方向并随后死去。

0 个答案:

没有答案