Deploying slim RESTFUL app to production

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

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

Hi, I’m glad you solved it!

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

:blush:

Hi there.

I have the same problem with my api…

my php server version is 5.6.34 … but it not working :frowning:

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