j6c
j6c

Reputation: 39

laravel aws blank page

I've installed laravel + laravel aws package on my local comp and everything works. Then I moved all the code via ftp to my hosting provider and aws stop working.

My code

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

On my comp it outputs

Guzzle\Service\Resource\Model Object ( [structure:protected] => [data:protected] => Array ( [TableNames] => Array ( [0] => users ) ) )

On hosting it is blank page.

I found this in 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} [] []

Any ideas?

Upvotes: 2

Views: 1477

Answers (1)

marcanuy
marcanuy

Reputation: 23972

One of the most common cases to receive the BSOD is that the web server isn't being able to write in app/storage directory. Make that folder writable, if it doesn't work check php web server logs or try this in public/index.php only for debugging:

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

Upvotes: 1

Related Questions