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

System cron possible run without user

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Invalid
    • 3.1.6
    • None
    • CLI, Cron
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: