Skip to content

[PHPUnit\Framework\Exception] ini_set(): Headers already sent. You cannot change the session module's ini settings at this time #87

@mickral

Description

@mickral

Hi, I setup codeception framework and when I'm trying to run functional test suite I receive error
[PHPUnit\Framework\Exception] ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

How can I dismiss this error to finish setup

We are using PHP + Symfony running in container

Details

  • Codeception version: 4.1.8
  • PHP Version: 7.3.11
  • Symfony: 5.1.7
  • Operating System: Red Hat
  • Installation type: Composer
  • functional.suite.yml:
 #Codeception Test Suite Configuration
 #Suite for functional tests
 #Emulate web requests and make application process them
 #Include one of framework modules (Symfony2, Yii2, Laravel5, Phalcon4) to use it
 #Remove this suite if you don't use frameworks
actor: FunctionalTester
modules:
    enabled:
        - Symfony:
              app_path: 'src'
              environment: '%APP_ENV%'
        - Doctrine2:
            depends: Symfony
            cleanup: true
        # add a framework module here
        - \Helper\Functional
    step_decorators: ~   
  framework:
    secret: '%env(APP_SECRET)%'
    #csrf_protection: true
    #http_method_override: true
    #Enables session support. Note that the session will ONLY be started if you read or write from it.
    #Remove or comment this section to explicitly disable session support.
    session:
        handler_id: 'session.handler.native_file'
        save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
        cookie_secure: auto
        cookie_samesite: lax
    #esi: true
    #fragments: true
    php_errors:
        log: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions