Ad Widget

Collapse

Zabbix 6.4 PHP Errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • semaja2
    Junior Member
    • Jul 2021
    • 2

    #1

    Zabbix 6.4 PHP Errors

    Hi,

    Recently upgraded to Zabbix 6.4 and noticed the error.log is being spammed with the below

    Code:
    [Tue Mar 21 17:22:29.071126 2023] [php7:notice] [pid 4191985] [client 17:23082] PHP Notice:  Undefined index: from in /usr/share/zabbix/include/classes/mvc/CController.php on line 355, referer: https://zabbix.net.work/zabbix.php?action=dashboard.view
    [Tue Mar 21 17:22:29.071271 2023] [php7:error] [pid 4191985] [client 17:23082] PHP Fatal error:  Uncaught Error: Call to a member function getTimestamp() on null in /usr/share/zabbix/widgets/actionlog/actions/WidgetView.php:110\nStack trace:\n#0 /usr/share/zabbix/include/classes/mvc/CController.php(468): Widgets\\ActionLog\\Actions\\WidgetView->doAction()\n#1 /usr/share/zabbix/include/classes/core/ZBase.php(634): CController->run()\n#2 /usr/share/zabbix/include/classes/core/ZBase.php(233): ZBase->processRequest()\n#3 /usr/share/zabbix/include/config.inc.php(25): ZBase->run()\n#4 /usr/share/zabbix/zabbix.php(22): require_once('/usr/share/zabb...')\n#5 {main}\n  thrown in /usr/share/zabbix/widgets/actionlog/actions/WidgetView.php on line 110, referer: https://zabbix.net.work/zabbix.php?action=dashboard.view​
    In addition I am unable to create new user roles as I get the below error

    Code:
    Undefined offset: 1 [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerUserroleCreate->doAction() → CControllerUserroleEditGeneral->getRulesInput() → CControllerUserroleEditGeneral->getModuleSectionRules() → array_map() → CControllerUserroleEditGeneral::{closure}() in app/controllers/CControllerUserroleEditGeneral.php:111]
    Undefined offset: 2 [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerUserroleCreate->doAction() → CControllerUserroleEditGeneral->getRulesInput() → CControllerUserroleEditGeneral->getModuleSectionRules() → array_map() → CControllerUserroleEditGeneral::{closure}() in app/controllers/CControllerUserroleEditGeneral.php:111]
    Invalid parameter "/1/rules/modules/1/status": an integer is expected.​
    Last edited by semaja2; 22-03-2023, 00:33.
  • pnierych
    Junior Member
    • Nov 2021
    • 3

    #2
    I have the same problem after upgrade with the User role. Can't add or edit roles - same error.
    Did you solve it?​

    Comment

    • pnierych
      Junior Member
      • Nov 2021
      • 3

      #3
      Solved for me!
      In the DB, records after the module tests remained in the "module" table. After deleting them, the error is fixed.
      :-)​

      Comment


      • rockandstone
        rockandstone commented
        Editing a comment
        Thank you, it worked like a charm
    • marco_a
      Junior Member
      • Mar 2023
      • 7

      #4
      I also have the same problem with user role, after importing the mysql db. Sorry, I still don't know much about zabbix, could you explain better what have to do on the db to overcome the problem, thanks​

      Comment

      • marco_a
        Junior Member
        • Mar 2023
        • 7

        #5
        my error:
        (apache log) PHP Warning: Undefined array key 25 in /usr/share/zabbix/app/controllers/CControllerUserroleEditGeneral.php on line 111, referer: https://my.serverzabbix/zabbix.php?action=userrole.edit

        Cannot create user role
        • Undefined array key 25 [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerUserroleCreate->doAction() → CControllerUserroleEditGeneral->getRulesInput() → CControllerUserroleEditGeneral->getModuleSectionRules() → array_map() → CControllerUserroleEditGeneral::{closure}() in app/controllers/CControllerUserroleEditGeneral.php:111]
        • Invalid parameter "/1/rules/modules/25/status": an integer is expected.
        • Undefined array key 25 [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerUserroleEdit->doAction() → CControllerUserroleEditGeneral->getRulesInput() → CControllerUserroleEditGeneral->getModuleSectionRules() → array_map() → CControllerUserroleEditGeneral::{closure}() in app/controllers/CControllerUserroleEditGeneral.php:111]


        Comment


        • rockandstone
          rockandstone commented
          Editing a comment
          Hello,

          Please access the database and execute the following SQL command: SELECT * FROM module;

          Next, attempt to delete the specific record that represents the lesson_gauge_chart in the module table. You can use the moduleid as a filter. For instance, in my case, the moduleid was 25.

          Please let me know if this works for you.

          Best regards.
          Last edited by rockandstone; 05-02-2024, 12:41.

        • rockandstone
          rockandstone commented
          Editing a comment
          I’d like to clarify that my decision to delete the lesson_gauge_chart was solely based on my previous attempt to create a gauge chart following a documentation guide. I’m uncertain as to why this action led to the issue. It’s worth noting that I wasn’t the only one experiencing this type of problem. Thank you.
      • marco_a
        Junior Member
        • Mar 2023
        • 7

        #6
        Hi, I solved it by deleting line 25 just as you indicated. Thanks a lot

        Comment

        • rafaelcosta13
          Junior Member
          • Jan 2023
          • 5

          #7
          thanks a lot,
          i solved my issue deleting another line

          | 1 | add_web_in_menu | modules/add-web-in-menu | 0 | [] |

          Comment

          Working...