Support the ongoing development of Laravel.io →
Configuration Requests
Last updated 2 years ago.
0

Any laravel/http server logs showing why it drops a http 500 error?

EDIT: Do you have this change applied? https://github.com/laravel/framework/commit/046a87e81fd30d6098002004e257244290c5725e

Last updated 9 years ago.
0

I have tried on both 5.1.2 and with the improvement to the request class as of 5.1.3, both return the same 500 error. Here is a stack trace from the log files

[2015-06-29 11:14:31] local.ERROR: exception 'GuzzleHttp\Exception\ServerException' with message 'Server error response [url] http://localhost/b2bapi/public/api/users [status code] 500 [reason phrase] Internal Server Error' in C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:89
Stack trace:
#0 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Subscriber\HttpError.php(33): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Message\Request), Object(GuzzleHttp\Message\Response))
#1 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Event\Emitter.php(109): GuzzleHttp\Subscriber\HttpError->onComplete(Object(GuzzleHttp\Event\CompleteEvent), 'complete')
#2 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\RequestFsm.php(91): GuzzleHttp\Event\Emitter->emit('complete', Object(GuzzleHttp\Event\CompleteEvent))
#3 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\RequestFsm.php(132): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#4 C:\Wamp\www\b2bscheme2\vendor\react\promise\src\FulfilledPromise.php(24): GuzzleHttp\RequestFsm->GuzzleHttp\{closure}(Array)
#5 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\ringphp\src\Future\CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)
#6 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Message\FutureResponse.php(43): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)
#7 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\RequestFsm.php(135): GuzzleHttp\Message\FutureResponse::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))
#8 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Client.php(165): GuzzleHttp\RequestFsm->__invoke(Object(GuzzleHttp\Transaction))
#9 C:\Wamp\www\b2bscheme2\vendor\guzzlehttp\guzzle\src\Client.php(125): GuzzleHttp\Client->send(Object(GuzzleHttp\Message\Request))
#10 C:\Wamp\www\b2bscheme2\app\Http\Controllers\TransferController.php(44): GuzzleHttp\Client->get('http://localhos...')
#11 C:\Wamp\www\b2bscheme2\app\Http\Controllers\TransferController.php(27): B2BScheme\Http\Controllers\TransferController->getUsers()
#12 [internal function]: B2BScheme\Http\Controllers\TransferController->getAll()
#13 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(256): call_user_func_array(Array, Array)
#14 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(164): Illuminate\Routing\Controller->callAction('getAll', Array)
#15 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(112): Illuminate\Routing\ControllerDispatcher->call(Object(B2BScheme\Http\Controllers\TransferController), Object(Illuminate\Routing\Route), 'getAll')
#16 [internal function]: Illuminate\Routing\ControllerDispatcher->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#17 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#18 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#19 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#20 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(114): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#21 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(69): Illuminate\Routing\ControllerDispatcher->callWithinStack(Object(B2BScheme\Http\Controllers\TransferController), Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'getAll')
#22 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Route.php(201): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request), 'B2BScheme\\Http\\...', 'getAll')
#23 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Route.php(134): Illuminate\Routing\Route->runWithCustomDispatcher(Object(Illuminate\Http\Request))
#24 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(704): Illuminate\Routing\Route->run(Object(Illuminate\Http\Request))
#25 [internal function]: Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#26 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#27 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#28 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#29 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(706): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#30 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(671): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#31 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(631): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#32 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(229): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
#33 [internal function]: Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#34 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(139): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#35 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#36 C:\Wamp\www\b2bscheme2\app\Http\Middleware\VerifyCsrfToken.php(20): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#37 [internal function]: B2BScheme\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure))
#38 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#39 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(54): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#40 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#41 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#42 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#45 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#46 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#47 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#48 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#51 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#52 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(124): call_user_func_array(Array, Array)
#54 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#55 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(103): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#56 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(118): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#57 C:\Wamp\www\b2bscheme2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(86): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#58 C:\Wamp\www\b2bscheme2\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#59 {main}  
0

I solved this for myself at least. The problem for me was that the API key wasn't being sent properly. Because the API key wasn't being sent to the mail client, it was returning a 500 server error.

In config/services.php I entered the API key for my mail driver. I'm using Mandrill, so I put my API key in for the 'secret' value and it worked.

This was confusing, because I thought that all I needed to do was put the API key as the server password in the mail.php file, but this was not the case.

Not sure if this is the same with you. I hope this helps.

0

@calebjacobo: You are such a life saver!! Thanks for sharing this solution. This did the magic for me. I had spent 5 hours and this one solution worked for me. Phew !!

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.