Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 500 on a working docker container

I'm using a slimframwork 3 app on laradock (nginx, mariadb, phpfpm, php 5.6) so I made a stupid syntax error:

$view->addExtension(new \Slim\Views\TwigExtension(
$container->router,
$container->request->getUri(),
));

the comma after the getUri() was giving me error 500 on chrome and that was frustration so I tried my app on wamp on windows and I get:

Parse error: syntax error, unexpected ')' in C:\wamp64\www\app\bootstrap\app.php on line 21

why was I having a 500 error with no clue of what was wrong.

P.S. I've set displayErrorDetails to true

like image 711
Getsuga Avatar asked Oct 26 '17 00:10

Getsuga


People also ask

When I get a 500 error which type of error am I encountering?

The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.

How do I test my Docker thin pool space?

Verify the new thin pool size using the Data Space Available field in the output of docker info . If you extended the docker/thinpool_tmeta logical volume instead, look for Metadata Space Available .

What is a container error?

CreateContainerConfigError and CreateContainerError are two errors that occur when a Kubernetes tries to create a container in a pod, but fails before the container enters the Running state.


1 Answers

Shoutout to Phil who solved this issue.

So when you use laradock and you come to a situation like this and you want more specific details about the error, you can either check your php-fpm container logs with:

docker logs -f <your container>

or set the "display_errors=On" on laradock/php-fpm/laravel.ini and you'll see your error message on your browser instead of error 500.

like image 141
Getsuga Avatar answered Sep 19 '22 14:09

Getsuga