laravel aws空白页

时间:2014-03-13 11:12:03

标签: laravel amazon-web-services

我在本地comp上安装了laravel + laravel aws包,一切正常。然后我通过ftp将所有代码移动到我的托管服务提供商,并停止工作。

我的代码

Route::get('/', function()
{
    error_reporting(E_ALL); ini_set('display_errors', '1');
    $db = AWS::get('DynamoDb');
    $result = $db->listTables();
    print_r($result);
    return;
});

在我的comp上输出

Guzzle \ Service \ Resource \ Model Object([structure:protected] => [data:protected] =>数组([TableNames] =>数组([0] =>用户)))

在托管时,它是空白页。

我在laravel log

中找到了这个
[2014-03-13 13:10:07] production.ERROR: Aws\DynamoDb\Exception\UnrecognizedClientException: AWS Error Code: UnrecognizedClientException, Status Code: 400, AWS Request ID: 3HIQREIPOI31J3DH0DELNOKJR7VV4KQNSO5AEMVJF66Q9ASUAAJG, AWS Error Type: client, AWS Error Message: The security token included in the request is invalid., User-Agent: aws-sdk-php2/2.5.3 Guzzle/3.8.1 curl/7.22.0 PHP/5.5.9-1+sury.org~precise+1 Laravel/4.1.23 L4MOD/1.1.0 [] []
[2014-03-13 13:10:07] production.ERROR: exception 'ErrorException' with message 'mcrypt_encrypt(): Size of key is too large for this algorithm' in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:77
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'mcrypt_encrypt(...', '/var/www/larave...', 77, Array)
#1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php(77): mcrypt_encrypt('rijndael-256', 'PUUGsdfdsTthaCV...', 's:40:"e10ce9a2b...', 'cbc', 'n'???[h????????...')
#2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php(56): Illuminate\Encryption\Encrypter->padAndMcrypt('e10ce9a2b9fb63c...', 'n'???[h????????...')
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(118): Illuminate\Encryption\Encrypter->encrypt('e10ce9a2b9fb63c...')
#4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Guard->encrypt(Object(Symfony\Component\HttpFoundation\Response))
#5 /var/www/laravel/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#6 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#7 /var/www/laravel/public/index.php(49): Illuminate\Foundation\Application->run()
#8 {main} [] []

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

接收BSOD的最常见情况之一是Web服务器无法在app / storage目录中写入。使该文件夹可写,如果它没有工作检查php web服务器日志或仅在public/index.php中进行调试:

try {
    $app->run();
} catch(\Exception $e) {
    echo "<pre>";
    echo $e;
    echo "</pre>";
}