# Problem with start

**URL:** <https://discourse.slimframework.com/t/problem-with-start/5249>\
**Category:** Questions\
**Created:** [May 4, 2022, 3:35pm UTC](https://discourse.slimframework.com/t/problem-with-start/5249 "2022-05-04T15:35:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zbigi](https://avatars.discourse-cdn.com/v4/letter/z/f14d63/32.png) [@Zbigi](https://discourse.slimframework.com/u/Zbigi)\
**Post date:** [May 4, 2022, 3:35pm UTC](https://discourse.slimframework.com/t/problem-with-start/5249/1 "2022-05-04T15:35:49Z")

</div>

Hi, I was only looking for a fairly simple framework for PHP. Well, I decided to try ‘SLIM’. Right now I’m not sure it was the right choice.  
I installed it with composer and everything went well until the first example in the documentation

```php
<?php

use Slim\Factory\AppFactory;

use Psr\Http\Message\ServerRequestInterface as Request;

use Psr\Http\Message\ResponseInterface as Response;

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

$app = AppFactory::create();

$app->get('/', function (Request $request, Response $response, $args) {

    $response->getBody()->write('Hello world!');
    return $response;
});
$app->get('/hello/{name}', function (Request $request, Response $response, $args) {
    $name=$args['name'];
    $response->getBody()->write("Hello $name!");
    return $response;
});
$app->run();

```

and I’ve got immidiately

```auto
Fatal error: Uncaught Slim\Exception\HttpNotFoundException: 
Not found. in /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:91 
Stack trace: 

#0 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Routing/RouteRunner.php(72): Slim\Middleware\RoutingMiddleware->performRouting(Object(GuzzleHttp\Psr7\ServerRequest)) 
#1 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest)) 
#2 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest)) 
#3 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/App.php(199): Slim\App->handle(Object(GuzzleHttp\Psr7\ServerRequest)) 
#4 /home/zbigi/domains/mai.grin.net.pl/public_html/index.php(15): Slim\App->run() 	
#5 {main} thrown in /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 91

```

ok, read forums, make change in .httacces and went to the second example with before and after middelware and promptly got next error

```auto
Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:91 Stack trace: \t	
#0 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Routing/RouteRunner.php(72): Slim\Middleware\RoutingMiddleware->performRouting(Object(GuzzleHttp\Psr7\ServerRequest)) \t	
#1 /home/zbigi/domains/mai.grin.net.pl/public_html/index.php(12): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest)) \t	
#2 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}(Object(GuzzleHttp\Psr7\ServerRequest), Object(Slim\Routing\RouteRunner)) \t	
#3 /home/zbigi/domains/mai.grin.net.pl/public_html/index.php(22): class@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest)) 
#4 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}(Object(GuzzleHttp\Psr7\ServerRequest), Object(class@anonymous)) 
5 /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Middlewa in /home/zbigi/domains/mai.grin.net.pl/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php on line 91

```

I have a question, will it be like this all the time and each step has a thousand errors? Is it better to quit and look for something more elaborate.

---

<div class="post-metadata">

**Author:** ![ashleycoles](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@ashleycoles](https://discourse.slimframework.com/u/ashleycoles)\
**Post date:** [May 5, 2022, 11:42am UTC](https://discourse.slimframework.com/t/problem-with-start/5249/2 "2022-05-05T11:42:42Z")

</div>

If you’re just getting started with Slim I’d suggest you start with the skeleton app rather than trying to configure your own: [GitHub - slimphp/Slim-Skeleton: Slim Framework 4 Skeleton Application](https://github.com/slimphp/Slim-Skeleton)
