Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14400

System cron possible run without user

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.1.6
    • Fix Version/s: None
    • Component/s: CLI, Cron
    • Labels:
      None
    • Environment:
      Debian 7.9 x86
      PHP 5.4.45
      MySQL(i) 5.6.27-76.0

      Description

      I'm use system cron. Run every 5 min with command

      su www-data -c "/usr/bin/php /path/forum/bin/phpbbcli.php cron:run"
      

      Have problem with every extension which use cron and write admin log.

      For example, this string:

      $this->log->add('admin', $this->user->data['user_id'], $this->user->data['session_ip'], 'BIRTHDAYSEND', false, array(implode(', ', $userlist)));
      

      result:

      PHP Fatal error:  SQL ERROR [ mysqli ]<br /><br />Column 'user_id' cannot be null [1048]<br /><br />SQL<br /><br />INSERT INTO phpbb_log  (user_id, log_ip, log_time, log_operation, log_type, log_data) VALUES (NULL, NULL, 1451772784, 'BIRTHDAYSEND', 0, ' ..... 
      

      and cron locks.

      My post on forum: https://www.phpbb.com/community/viewtopic.php?p=14302461#p14302461

      I tested this with another two extensions and had the same errors.
      https://github.com/rxu/topic_actions
      https://github.com/AlexSheer/phpbb3.1-Connection-Log
      and the first: https://github.com/ForumHulp/emailonbirthday

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              Siava Siava
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: