Well, my directory in the slim framework was standard ..
/public
/vendor
/src
/cache
/app
between the other folders ..
and within / public The index.php
was calling the other files and folder normally ..
require __DIR__ . '/../vendor/autoload.php';
if(empty(session_id()))
{
session_start();
}
// Instantiate the app
$settings = require __DIR__ . '/../src/settings.php';
$app = new \Slim\App($settings);
// Set up dependencies
require __DIR__ . '/../src/dependencies.php';
// Register middleware
require __DIR__ . '/../src/middleware.php';
// Register routes
require __DIR__ . '/../src/routes.php';
// Run app
$app->run();
But I had to move these main folders to a subfolder /v1
getting directory with only
/public
/v1
and with index.php
of /public
certainly changed ..
require __DIR__ . '/../v1/vendor/autoload.php';
if(empty(session_id()))
{
session_start();
}
// Instantiate the app
$settings = require __DIR__ . '/../v1/src/settings.php';
$app = new \Slim\App($settings);
// Set up dependencies
require __DIR__ . '/../v1/src/dependencies.php';
// Register middleware
require __DIR__ . '/../v1/src/middleware.php';
// Register routes
require __DIR__ . '/../v1/src/routes.php';
// Run app
$app->run();
It's all working except the $_SESSION
saved it is built in AuthModel.php
normally but when it reaches RestrictedController.php
are all empty ..
Yes I already checked if there are any errors in these files, but not because when I was the default directory everything was ok ..
But unfortunately I need to use this last said directory template ..
Can someone give me a light I do not know where else to look for kkk errors (msm tvz being in the simplest place)