# Run Slim 3 on Linux

**URL:** <https://discourse.slimframework.com/t/run-slim-3-on-linux/451>\
**Category:** Questions\
**Created:** [June 29, 2016, 1:09pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451 "2016-06-29T13:09:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maclanglade](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maclanglade](https://discourse.slimframework.com/u/Maclanglade)\
**Post date:** [June 29, 2016, 1:09pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/1 "2016-06-29T13:09:44Z")

</div>

Hi,

I’m a new user of Slim 3 and can’t run it on my Linux server.

Following that tutorial : [http://www.slimframework.com/docs/tutorial/first-app.html](http://www.slimframework.com/docs/tutorial/first-app.html)  
I create a subfolder in my apache directory (there are other websites in folder) and put the code.

When I try to access to folder I got an error.  
On Windows Apache, with the command "php -S localhost:8080 -t ./public/ " it works fine

`Parse error: syntax error, unexpected '[', expecting ')' in /var/www/scolarit/public/index.php on line 15`

Thanks for your help

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [June 29, 2016, 1:32pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/2 "2016-06-29T13:32:04Z")

</div>

what’s in your index.php?

---

<div class="post-metadata">

**Author:** ![Maclanglade](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maclanglade](https://discourse.slimframework.com/u/Maclanglade)\
**Post date:** [June 29, 2016, 1:40pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/3 "2016-06-29T13:40:40Z")

</div>

start’s by :

`\<?php  
use \Psr\Http\Message\ServerRequestInterface as Request;  
use \Psr\Http\Message\ResponseInterface as Response;

require ‘…/vendor/autoload.php’;  
require ‘push\_helper.php’;

$config[‘displayErrorDetails’] = true;

$config[‘db’][‘host’] = “localhost”;  
$config[‘db’][‘user’] = “root”;  
$config[‘db’][‘pass’] = “password”;  
$config[‘db’][‘dbname’] = “db”;

$app = new \Slim\App([“settings” =\> $config]); // \<-- here is the line 15

$container = $app-\>getContainer();`

---

<div class="post-metadata">

**Author:** ![JoeBengalen](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@JoeBengalen](https://discourse.slimframework.com/u/JoeBengalen)\
**Post date:** [June 29, 2016, 2:04pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/4 "2016-06-29T14:04:33Z")

</div>

Do you have PHP 5.4 or before?

---

<div class="post-metadata">

**Author:** ![Maclanglade](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maclanglade](https://discourse.slimframework.com/u/Maclanglade)\
**Post date:** [June 29, 2016, 2:07pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/5 "2016-06-29T14:07:26Z")

</div>

Before : my version is PHP 5.3.10

---

<div class="post-metadata">

**Author:** ![augusthur](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/augusthur/32/76_2.png) [@augusthur](https://discourse.slimframework.com/u/augusthur)\
**Post date:** [June 29, 2016, 9:53pm UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/6 "2016-06-29T21:53:09Z")

</div>

PHP 5.5 is the minimum supported version.  
See [https://github.com/slimphp/Slim/pull/1425](https://github.com/slimphp/Slim/pull/1425)

---

<div class="post-metadata">

**Author:** ![Maclanglade](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@Maclanglade](https://discourse.slimframework.com/u/Maclanglade)\
**Post date:** [June 30, 2016, 7:55am UTC](https://discourse.slimframework.com/t/run-slim-3-on-linux/451/7 "2016-06-30T07:55:10Z")

</div>

Ok I see, thank you.
