2016-03-14 32 views
1

我實際上用silex和doctrine構建了一個應用程序。Silex原則和調試

其實,在開發模式中工作很好,我可以訪問我的數據庫。

事實上,現在我改變了我的數據庫信息以匹配我的OVH mysql。

現在,當我嘗試啓動我的OVH域我的申請,我得到了

Whoops, looks like something went wrong. 

,別無其他。

我根本不知道如何獲取更多關於它的信息,並且找不到任何工作解決方案來記錄故障狀態的細節。

感謝您幫助

+0

經過錯誤日誌(應用程序和網絡服務器)? – JimL

回答

1

爲了使其工作,使調試:

use Symfony\Component\HttpKernel\Debug\ErrorHandler; 
use Symfony\Component\HttpKernel\Debug\ExceptionHandler; 

// Set the error handling 
ini_set('display_errors', 1); 
error_reporting(-1); 

ErrorHandler::register(); 

if ('cli' !== php_sapi_name()) { 
    ExceptionHandler::register(); 
} 

$app = new Silex\Application(); 
$app['debug'] = true 

$app->run(); 

您也可以捕捉異常喜歡如下:

$app->error(function(\Exception $e) use ($app) { 
    print $e->getMessage(); // Do something with $e 
};