Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
J
Joomla
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Jobs
  • Issue Boards
  • Development
  • Joomla
  • Issues
  • #21

Closed
Open
Opened Aug 24, 2019 by andrewpthompson@andrewpthompson

cron.php broken since Joomla 3.8 in some PHP environments

This issue was mentioned in https://issues.civicrm.org/jira/browse/CRM-21203 and the associated PR, which eventually solved problems for cli.php. But there is a session issue that hasn't gone away for cron.php so I am reporting that here.

Depending on PHP error reporting settings (and PHP version possibly, certainly it happens on PHP 7+), this warning will be given:

Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /var/www/html/membership/libraries/joomla/session/handler/joomla.php on line 48

Which may also cause this one:

Warning: session_cache_limiter(): Cannot change cache limiter when headers already sent in /var/www/html/membership/libraries/joomla/session/handler/native.php on line 235

Followed by this error:

Error: Failed to start application: Failed to start the session because headers have already been sent by "/var/www/html/membership/libraries/joomla/session/handler/joomla.php" at line 48.

The cron.php problem started in Joomla 3.8 due to a change that Joomla made to JSessionHandlerJoomla::__construct() in libraries/joomla/session/handler/joomla.php.

It could be fixed by Joomla, however I have given up on that. There was an abandoned Joomla PR #15742, superseded by PR #21260, which is also languishing. Anyway we might be better off fixing this on the CiviCRM side.

This is a similar (but separate) case to https://github.com/civicrm/civicrm-core/pull/14074, where extern/rest.php called session_start() before bootstrapping the CMS - that issue referred to Drupal though I am sure that it applied to Joomla also (don't know about Wordpress). Removing session_start() was the solution for that REST session problem.

Edited Aug 24, 2019 by andrewpthompson
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: dev/joomla#21