# Slim Deploy Error

**URL:** <https://discourse.slimframework.com/t/slim-deploy-error/3076>\
**Category:** Questions\
**Created:** [April 4, 2019, 5:47pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076 "2019-04-04T17:47:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ajay/32/856_2.png) [@ajay](https://discourse.slimframework.com/u/ajay)\
**Post date:** [April 4, 2019, 5:47pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/1 "2019-04-04T17:47:11Z")

</div>

\*\*Slim Deploy 500 Error

My Project Structure

 ![dfsdf](https://canada1.discourse-cdn.com/flex030/uploads/slimframework/original/1X/e532a0bd159852f18e9db29408fc82d5fb67ed65.png) \*\*

Public/index.php

```
    <?php
    require __DIR__.'/../bootstrap/app.php';
    $app->run();
    ?>

```

bootstrap/app.php

```
<?php

require __DIR__.'/../vendor/autoload.php';
require 'config.php';

session_start();

$app = new \Slim\App([
    'settings' => [
        'displayErrorDetails' => false
    ]
    ]);

$container = $app->getContainer();

$container['auth'] = function ($container) {
    return new \App\Auth\Auth;
};

$container['flash'] = function ($container) {
    return new \Slim\Flash\Messages;
};

$container['view'] = function ($container) {
    $view = new \Slim\Views\Twig( __DIR__.'/../resourses/views', [
        'cache' => false,
    ]);

$container['errorHandler'] = function ($container) {
    return function ($request, $response, $exception) use ($container) {
        // retrieve logger from $container here and log the error
        $response->getBody()->rewind();
        return $response->withStatus(500)
                        ->withHeader('Content-Type', 'text/html')
                        ->write("Oops, something's gone wrong!");
    };
};
    
$container['phpErrorHandler'] = function ($container) {
    return function ($request, $response, $error) use ($container) {
        // retrieve logger from $container here and log the error
        $response->getBody()->rewind();
        return $response->withStatus(500)
                        ->withHeader('Content-Type', 'text/html')
                        ->write("Oops, something's gone wrong!");
    };
};

   $view->getEnvironment()->addGlobal('flash', $container->flash);

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

    return $view;
};

require __DIR__. '/../routes/web.php';

```

any help how to deploy online hosting

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [April 4, 2019, 6:44pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/2 "2019-04-04T18:44:40Z")

</div>

> [@ajay](#):
>
> ‘displayErrorDetails’ =\> false

Hello!

Error 500 is a very general error message.  
Did you try to activate the error details?

`'displayErrorDetails' => true`

Also check the server error logfiles.

---

<div class="post-metadata">

**Author:** ![ajay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ajay/32/856_2.png) [@ajay](https://discourse.slimframework.com/u/ajay)\
**Post date:** [April 4, 2019, 6:46pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/3 "2019-04-04T18:46:06Z")

</div>

HTTP ERROR 500

unable to handle a  
request

is this Path is correct : **DIR**.’/…/vendor/autoload.php on online hosting

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [April 4, 2019, 7:44pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/4 "2019-04-04T19:44:37Z")

</div>

Can you please deploy this [Slim 3 Hello World App](https://github.com/odan/slim-hello-world) on your host and tell me if it works?

---

<div class="post-metadata">

**Author:** ![jDolba](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/jdolba/32/815_2.png) [@jDolba](https://discourse.slimframework.com/u/jDolba)\
**Post date:** [April 4, 2019, 8:01pm UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/5 "2019-04-04T20:01:37Z")

</div>

“Unable to handle request” is not message from your php application; it is server (apache?) error

it will be error in your configuration (htaccess, vhost?)  
also it is possible that you had deployed your files without sufficient rights

you need to open your server error log and investigate issue, start with server(apache?) error log, then application (php) error log

---

<div class="post-metadata">

**Author:** ![ajay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ajay/32/856_2.png) [@ajay](https://discourse.slimframework.com/u/ajay)\
**Post date:** [April 5, 2019, 6:16am UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/6 "2019-04-05T06:16:40Z")

</div>

i’m Use shared hosting

---

<div class="post-metadata">

**Author:** ![ajay](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/ajay/32/856_2.png) [@ajay](https://discourse.slimframework.com/u/ajay)\
**Post date:** [April 5, 2019, 8:39am UTC](https://discourse.slimframework.com/t/slim-deploy-error/3076/7 "2019-04-05T08:39:42Z")

</div>

Problem Solved,  
try the same method 5-6 times but not work  
last same method work

🙃  
I don’t know what problem

but thanks everybody
