Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16218

Civix fails to create session when adding API function

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.8
    • Fix Version/s: Unscheduled
    • Component/s: Extension System
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      This is basically to replicate CRM-13295. Exactly the same problem:

      [ErrorException]
      Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /root/civix/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php line 56

      I've seen it happen on two setups:

      --Windows 7 with XAMPP and Civi 4.5.0
      --CentOS 6.6 with Civi 4.5.8 - set up today (2015/04/02), so with most recent composer, git, civix etc.

      Both are running Civi under WordPress. And in both cases civix works fine for everything else I've tried. The Windows setup was last year, and I don't have access to it any more (I just assumed it was Windows weirdness, tbh).

      As requested on previous issue, backtrace is attached. And the functions evaluate as follows (ended up the same as the example setup):

      !isset($this->_session) ---> TRUE (run the nested code...)
      !isset($_SESSION) && PHP_SAPI !== 'cli' ---> FALSE (skip the nested code...)
      $isRead ---> TRUE (run the nested code...)

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              krypto Andrew West
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: