You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we're using this module in a SilverStripe website, we also use symbiote/silverstripe-sqs-jobqueue which is executed through CLI. Recently, we upgraded from PHP 7.1 to PHP 7.4, and SS from 4.3 to 4.7, and found warnings being issued during the SQS worker execution. We discovered that since PHP 7.2, calling session_set_save_handler() will raise a warning if there already is output on the console. However, I don't think that registering sessions needs to happen during CLI execution at all.
Stacktrace:
E_WARNING: session_set_save_handler(): Cannot change save handler when headers already sent
in session_set_save_handler called at /path/to/site/vendor/aws/aws-sdk-php/src/DynamoDb/SessionHandler.php (93)
in Aws\DynamoDb\SessionHandler::register called at /path/to/site/vendor/silverstripe/dynamodb/code/Model/DynamoDbSession.php (118)
in SilverStripe\DynamoDb\Model\DynamoDbSession::register called at /path/to/site/vendor/silverstripe/dynamodb/_config.php (7)
in require_once called at /path/to/site/vendor/silverstripe/framework/src/Core/Manifest/Module.php (289)
in SilverStripe\Core\Manifest\requireFile called at /path/to/site/vendor/silverstripe/framework/src/Core/Manifest/Module.php (187)
in SilverStripe\Core\Manifest\Module::activate called at /path/to/site/vendor/silverstripe/framework/src/Core/Manifest/ModuleManifest.php (153)
in SilverStripe\Core\Manifest\ModuleManifest::activateConfig called at /path/to/site/vendor/silverstripe/framework/src/Core/CoreKernel.php (213)
in SilverStripe\Core\CoreKernel::bootConfigs called at /path/to/site/vendor/silverstripe/framework/src/Core/CoreKernel.php (197)
in SilverStripe\Core\CoreKernel::boot called at /path/to/site/vendor/silverstripe/framework/src/Control/HTTPApplication.php (135)
in SilverStripe\Control\HTTPApplication::SilverStripe\Control\{closure} called at /path/to/site/vendor/silverstripe/framework/src/Control/Middleware/HTTPMiddlewareAware.php (65)
in SilverStripe\Control\HTTPApplication::callMiddleware called at /path/to/site/vendor/silverstripe/framework/src/Control/HTTPApplication.php (137)
in SilverStripe\Control\HTTPApplication::execute called at /path/to/site/vendor/silverstripe/framework/src/Control/HTTPApplication.php (116)
in SilverStripe\Control\HTTPApplication::handle called at /path/to/site/vendor/symbiote/silverstripe-sqs-jobqueue/sqs-worker.php (76)
in{closure} called at /path/to/site/vendor/symbiote/silverstripe-sqs-jobqueue/sqs-worker.php (90)
To overcome this problem short-term, we created a patch that is wrapping a condition around the $dynamoSession initialisation/registration in silverstripe/silverstripe-dynamodb/_config.php checking whether it's a CLI call or not.
Hi,
we're using this module in a SilverStripe website, we also use
symbiote/silverstripe-sqs-jobqueue
which is executed through CLI. Recently, we upgraded from PHP 7.1 to PHP 7.4, and SS from 4.3 to 4.7, and found warnings being issued during the SQS worker execution. We discovered that since PHP 7.2, callingsession_set_save_handler()
will raise a warning if there already is output on the console. However, I don't think that registering sessions needs to happen during CLI execution at all.Stacktrace:
To overcome this problem short-term, we created a patch that is wrapping a condition around the
$dynamoSession
initialisation/registration insilverstripe/silverstripe-dynamodb/_config.php
checking whether it's a CLI call or not.Maybe that's something you want to consider putting into code, or you might even have a more elegant fix for that?
Cheers
-Rob
The text was updated successfully, but these errors were encountered: