Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    LCDProc fails to start after RC 23.01 Upgrade

    Scheduled Pinned Locked Moved Plus 23.01 Development Snapshots (Retired)
    4 Posts 2 Posters 1.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      raydemption
      last edited by

      After upgrading to 23.01RC from 22.05 Release, LCDProc fails to start.

      PHP ERROR: Type: 1, File: /usr/local/pkg/lcdproc_client.php, Line: 1257, Message: Uncaught Error: Undefined constant "i" in /usr/local/pkg/lcdproc_client.php:1257
      Stack trace:
      #0 /usr/local/pkg/lcdproc_client.php(1403): loop_status(Resource id #49)
      #1 {main}
      
      1 Reply Last reply Reply Quote 0
      • jimpJ Offline
        jimp Rebel Alliance Developer Netgate
        last edited by

        Looks like there are a couple cases of that in the file, can you try this diff and see if any other errors pop up after these are fixed?

        index 8344e5ed430f..e6718b8ab810 100644
        --- a/a/usr/local/pkg/lcdproc_client.php
        +++ b/a/usr/local/pkg/lcdproc_client.php
        @@ -1254,7 +1254,7 @@ function loop_status($lcd) {
                                                $title = ($lcdpanel_width >= 20) ? "Interface bps IN/OUT" : "Intf. bps IN/OUT";
                                                $lcd_cmds[] = "widget_set $name title_wdgt 1 1 \"{$title}\"";
         
        -                                       for($i = 0; $i < ($lcdpanel_height - 1) && i < count($interfaceTrafficStrings); $i++) {
        +                                       for($i = 0; $i < ($lcdpanel_height - 1) && $i < count($interfaceTrafficStrings); $i++) {
         
                                                        $lcd_cmds[] = "widget_set $name text_wdgt{$i} 1 " . ($i + 2) . " \"{$interfaceTrafficStrings[$i]}\"";
                                                }
        @@ -1267,7 +1267,7 @@ function loop_status($lcd) {
                                                $title = ($lcdpanel_width >= 20) ? "Total today   IN/OUT" : "Today   IN / OUT";
                                                $lcd_cmds[] = "widget_set $name title_wdgt 1 1 \"{$title}\"";
         
        -                                       for($i = 0; $i < ($lcdpanel_height - 1) && i < count($interfaceTrafficStrings); $i++) {
        +                                       for($i = 0; $i < ($lcdpanel_height - 1) && $i < count($interfaceTrafficStrings); $i++) {
         
                                                        $lcd_cmds[] = "widget_set $name text_wdgt{$i} 1 " . ($i + 2) . " \"{$interfaceTrafficStrings[$i]}\"";
                                                }
        @@ -1280,7 +1280,7 @@ function loop_status($lcd) {
                                                $title = ($lcdpanel_width >= 20) ? "Total         IN/OUT" : "Total   IN / OUT";
                                                $lcd_cmds[] = "widget_set $name title_wdgt 1 1 \"{$title}\"";
         
        -                                       for($i = 0; $i < ($lcdpanel_height - 1) && i < count($interfaceTrafficStrings); $i++) {
        +                                       for($i = 0; $i < ($lcdpanel_height - 1) && $i < count($interfaceTrafficStrings); $i++) {
         
                                                        $lcd_cmds[] = "widget_set $name text_wdgt{$i} 1 " . ($i + 2) . " \"{$interfaceTrafficStrings[$i]}\"";
                                                }
        

        I don't have any LCD panels here to test with so I can't check it directly.

        You can install the System Patches package and then create an entry for that diff to apply the fix.

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          raydemption @jimp
          last edited by

          @jimp this patch appears to have resolved the issue. I'll monitor and update this post if any crashes occur.

          Thank you for looking into this so quickly!

          1 Reply Last reply Reply Quote 1
          • jimpJ Offline
            jimp Rebel Alliance Developer Netgate
            last edited by

            I committed that change to the package so when we do another build, it will be fixed there.

            Thanks for testing!

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.