# Deploying slim RESTFUL app to production

**URL:** <https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212>\
**Category:** Questions\
**Created:** [February 4, 2018, 11:30pm UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212 "2018-02-04T23:30:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![msedek](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@msedek](https://discourse.slimframework.com/u/msedek)\
**Post date:** [February 4, 2018, 11:30pm UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212/1 "2018-02-04T23:30:24Z")

</div>

Hello, I want to thanks everyone involved into create this framework, I have been enjoying it a lot since 2 days ago when I first started using it…

that said… I would like to get some help here, I did develop an app with slim and with my xampp server works great, then I tried to deploy it to my live server and it just refuses to work… I dont know if somehow I am missing some step, honestly dont know if I have to install composer (somehow) in my live server.

My app structure is

html\_public  
|…index.php  
|…htaccess  
src  
…config  
…db.php  
…routes  
…costumers.php  
|  
|  
vendor  
|  
|  
composer.json  
composer.lock

same as my webserver structure… by testing, my db connection is good as I tried with some connection test script in the index.php and it works great…

By doing echo “debug”

//here echo “debug works”

use \Psr\Http\Message\ServerRequestInterface as Request;  
use \Psr\Http\Message\ResponseInterface as Response;

//here echo “debug works”

require ‘…/vendor/autoload.php’;  
require ‘…/src/config/db.php’;

//here echo “debug works”

$app = new \Slim\App;

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*HERE echo “debug” DOES NOT WORKS

//Clientes route  
require ‘…/src/routes/costumers.php’;

$app-\>run();

something is causing the app to stop working after the $app = new \Slim\App; got over 10 hours reading and trying to fix the issue with no luck… would appreciate the help.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![msedek](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@msedek](https://discourse.slimframework.com/u/msedek)\
**Post date:** [February 5, 2018, 12:32am UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212/2 "2018-02-05T00:32:22Z")

</div>

Well at the end I read that Slim needs at least php 5.5 to work and my hosting provider sets 5.4 by default… once I changed it the API went silk smooth… thanks anyways… keep doing the great work you have been doing so far… cheers

---

<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:** [February 6, 2018, 6:51am UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212/3 "2018-02-06T06:51:31Z")

</div>

Hi, I’m glad you solved it!

---

<div class="post-metadata">

**Author:** ![msedek](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@msedek](https://discourse.slimframework.com/u/msedek)\
**Post date:** [February 6, 2018, 7:08am UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212/4 "2018-02-06T07:08:12Z")

</div>

thanks hehe… I am way ahead in the develpment atm… restful its so convenient…

😊

---

<div class="post-metadata">

**Author:** ![rollano](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rollano](https://discourse.slimframework.com/u/rollano)\
**Post date:** [March 30, 2018, 4:48pm UTC](https://discourse.slimframework.com/t/deploying-slim-restful-app-to-production/2212/5 "2018-03-30T16:48:46Z")

</div>

Hi there.

I have the same problem with my api…

my php server version is 5.6.34 … but it not working ☹

could any one help ? please

* * *

html\_public  
APP  
api\_rest  
ipoomsae  
public  
…index.php  
…htaccess

src  
config  
…db.php  
routes  
…articles.php  
|  
vendor  
|  
|  
composer.json  
composer.lock
