I am about to move a Joomla application (Joomla! 3.7.3 Stable) into a docker environment. This unfortunately causes the JFactory::getApplication('site') an Application Instantiation Error that I do not receive in a non-docker environment.
The whole error message:
Error displaying the error page:
Application Instantiation Error:
Failed to start the session because headers have already been sent by "/var/www/html/project/libs/exporter/TCXExporter.php" at line 132.
I am running a php:7.3-apache image as my base. Once the container is built, I install the following PHP extensions with the help of docker-php-ext-install:
Further, I enable mod_rewrite by executing a2enmod rewrite.
Neither PHP nor apache are logging any errors that would provide further insights. I have compared the PHP extensions on my host machine with the extensions in the docker container, but could not identify a problem there. That said, I still do not exclude a missing extension as the reason for the error.
I was able to identify the following line of code as the one that causes the failure:
$mainframe = & JFactory::getApplication('site');