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

Civix fails to create session when trying to add API function

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.2.9
    • Fix Version/s: 4.4.1
    • Component/s: Extension System
    • Labels:
      None

      Description

      I'm having trouble adding an API function to a module. It's failing, and I'm not clear on why.

      Errors as follows:

      <pre>
      root@sandbox-006:/var/local/www/xxxxxx/htdocs/sites/all/civicrm/extensions/xxxxxx.mailingstats# civix generate:api MailingStatsReport Update
      Write /var/local/www/xxxxxx/htdocs/sites/all/civicrm/extensions/xxxxxx.mailingstats/api/v3/MailingStatsReport/Update.php

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

      generate:api [--schedule[="..."]] <EntityName> <ActionName>
      </pre>

      I'm running:
      Debian 6.0 (squeeze).

      • Civicrm 4.2.9 (with some backports from 4.2.10),
      • PHP 5.3.3-7+squeeze17 with Suhosin-Patch v0.9.32.1
      • civix/composer.lock referes to Symfony 2.1.7.

      Looking at strace output, I can see where it loads civix/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php and just afterwards runs stat64 on civix/app/cache/dev/sessions, which has session files in it from earlier use of civix, but no new ones. I don't see any system call that tries to create a session file, or otherwise access the directory after stat'ing it.

      I'm not all that clear on how some of the fields for this issue. Please correct as appropriate

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              mc0e Andrew McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: