Unable to move SLIM3 Install from 5.7 box to 7.2.3 box

So we moved a slim 3 from a 5.7 box to 7.2.3 both on apache

Question 1 is HOW can I turn on logging to see what is going on? I haven’ not been able to do this.

Question 2. The function below to create the view container is failing

Our HTACCESS file:

php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag  log_errors on
php_value error_log /var/www/html/web/panopto/testlog.log

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

OUR COMPOSER VERSIONS…

bugsnag/bugsnag v3.26.0 Official Bugsnag notifier for PHP applications.
composer/ca-bundle 1.2.9 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA …
defuse/php-encryption v2.2.1 Secure PHP Encryption Library
doctrine/inflector 1.4.3 PHP Doctrine Inflector is a small library that can perform string manipulations with reg…
doctrine/lexer 1.2.1 PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.
egulias/email-validator 3.1.0 A library for validating emails against several RFCs
eluceo/ical 0.11.6 The eluceo/iCal package offers a abstraction layer for creating iCalendars. You can easi…
firebase/php-jwt v4.0.0 A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to th…
google/apiclient v2.1.3 Client library for Google APIs
google/apiclient-services v0.11 Client library for Google APIs
google/auth v0.11.1 Google Auth Library for PHP
guzzlehttp/guzzle 6.5.5 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.4.1 Guzzle promises library
guzzlehttp/psr7 1.8.1 PSR-7 message implementation that also provides common utility methods
illuminate/container v5.8.36 The Illuminate Container package.
illuminate/contracts v5.8.36 The Illuminate Contracts package.
illuminate/database v5.8.36 The Illuminate Database package.
illuminate/support v5.8.36 The Illuminate Support package.
jeremeamia/superclosure 2.4.0 Serialize Closure objects, including their context and binding
lavary/crunz v1.12.4 Schedule your tasks right from the code.
monolog/monolog 1.26.0 Sends your logs to files, sockets, inboxes, databases and various web services
mtdowling/cron-expression v1.2.3 CRON for PHP: Calculate the next or previous run date and determine if a CRON expression…
nesbot/carbon 2.46.0 An API extension for DateTime that supports 281 different languages.
nikic/fast-route v1.3.0 Fast request router for PHP
nikic/php-parser v4.10.4 A PHP parser written in PHP
paragonie/random_compat v9.99.100 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
phpseclib/phpseclib 2.0.30 PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X…
pimple/pimple v3.4.0 Pimple, a simple Dependency Injection Container
podio/podio-php v4.4.0 PHP Client for Podio API
psr/cache 1.0.1 Common interface for caching libraries
psr/container 1.1.1 Common Container Interface (PHP FIG PSR-11)
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.3 Common interface for logging libraries
psr/simple-cache 1.0.1 Common interfaces for simple caching
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
respect/validation 1.1.31 The most awesome validation engine ever created for PHP
sendgrid/php-http-client 3.14.0 HTTP REST client, simplified for PHP
sendgrid/sendgrid 6.2.0 This library allows you to quickly and easily send emails through SendGrid using PHP.
slim/csrf 0.8.3 Slim Framework 3 CSRF protection middleware
slim/flash 0.2.0 Slim Framework Flash message service provider
slim/slim 3.12.3 Slim is a PHP micro framework that helps you quickly write simple yet powerful web appli…
slim/twig-view 2.5.1 Slim Framework 3 view helper built on top of the Twig 2 templating component
swiftmailer/swiftmailer v6.2.7 Swiftmailer, free feature-rich PHP mailer
symfony/config v4.4.20 Helps you find, load, combine, autofill and validate configuration values of any kind
symfony/console v4.4.21 Eases the creation of beautiful and testable command line interfaces
symfony/dependency-injection v4.4.21 Allows you to standardize and centralize the way objects are constructed in your applica…
symfony/filesystem v4.4.21 Provides basic utilities for the filesystem
symfony/lock v4.4.21 Creates and manages locks, a mechanism to provide exclusive access to a shared resource
symfony/polyfill-ctype v1.22.1 Symfony polyfill for ctype functions
symfony/polyfill-iconv v1.22.1 Symfony polyfill for the Iconv extension
symfony/polyfill-intl-idn v1.22.1 Symfony polyfill for intl’s idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer v1.22.1 Symfony polyfill for intl’s Normalizer class and related functions
symfony/polyfill-mbstring v1.22.1 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56 v1.20.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php72 v1.22.1 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73 v1.22.1 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.22.1 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process v4.4.20 Executes commands in sub-processes
symfony/service-contracts v2.2.0 Generic abstractions related to writing services
symfony/translation v4.4.21 Provides tools to internationalize your application
symfony/translation-contracts v2.3.0 Generic abstractions related to translation
symfony/yaml v4.4.21 Loads and dumps YAML files
twig/twig v3.3.0 Twig, the flexible, fast, and secure template language for PHP
vlucas/phpdotenv v2.6.7 Loads environment variables from .env to getenv(), $_ENV and $_SERVER automagica…

So the container in our APP PHP which is failing is

$container['view'] = function ($container) {
    $view = new \Slim\Views\Twig(__DIR__ . '/../resources/views/', [
        'cache' => false
    ]);

    echo "<br><h1>Wontttttt Load Twig View container</h1>";

var_dump($view);

    $view->addExtension(new \Slim\Views\TwigExtension(
        $container->router,
        $container->request->getUri()
    ));
//var_dump($view);

    $view->getEnvironment()->addGlobal('auth', [
        'check' => $container->auth->check(),
        'user' => $container->auth->user()
    ]);

    $view->getEnvironment()->addGlobal('status', getenv('STATUS'));

    $filter = new Twig_SimpleFilter('unserialize', function ($string) {
        return unserialize($string);
    });
    $view->getEnvironment()->addFilter($filter);

    $filter = new Twig_SimpleFilter('url_decode', function ($string) {
        return urldecode($string);
    });
    $view->getEnvironment()->addFilter($filter);

    $view->getEnvironment()->addGlobal('flash', $container->flash);

    return $view;
};

Can you install this application on your local development machine?

This is the local development machine in which we’re trying to bring it up on…do you mean like a Vagrant box…

You may try to enable the error reporting for PHP:

error_reporting(E_ALL);
ini_set('display_errors', '1');

In Slim 3 the default error handler can also include detailed error diagnostic information. To enable this you need to set the displayErrorDetails setting to true: