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

    PHP Error putting a grep command

    Scheduled Pinned Locked Moved webGUI
    2 Posts 2 Posters 201 Views
    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.
    • S
      sammiorelli
      last edited by

      It seems I've stumbled on a bug. When I put a grep command

      grep ^date -v-1d +"%D" /var/log/snort/snort_igb0*/alert | awk -F, '{a[$5]++;} END {for(i in a) print a[i]" "i}' | sed 's/"//g' | sort -r ; echo

      into the form to make an e-mail alert, I get the following crash:
      Crash report begins. Anonymous machine information:

      arm64
      15.0-CURRENT
      FreeBSD 15.0-CURRENT #0 plus-RELENG_24_11-n256407-1bbb3194162: Fri Nov 22 05:12:13 UTC 2024 root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/obj/aarch64/KRivbaXa/var/jenkins/workspace/pfSense-Plus-snapshots-24_11-main/sources/Free

      Crash report details:

      PHP Errors:
      [14-Feb-2025 11:15:09 US/Eastern] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_mail_report_edit.php:44
      Stack trace:
      #0 {main}
      thrown in /usr/local/www/status_mail_report_edit.php on line 44
      [14-Feb-2025 11:15:45 US/Eastern] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/status_mail_report_edit.php:44
      Stack trace:
      #0 {main}
      thrown in /usr/local/www/status_mail_report_edit.php on line 44

      No FreeBSD crash data found.

      If I reload, I get the same error, so I can't even try to change the inputs anymore.

      GertjanG 1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan @sammiorelli
        last edited by

        @sammiorelli

        What is your pfSEnse version ?
        I didn't see any errors.

        [24.11-RELEASE][root@pfSense.bhf.tld]/root: grep ^date -v-1d +"%D" /var/log/snort/snort_igb0*/alert | awk -F, '{a[$5]++;} END {for(i in a) print a[i]" "i}' | sed 's/"//g' | sort -r ; echo
        grep: No match.
        

        Just : No match.

        edit : I get it : you entered that command here :

        ea836970-e55f-4f19-8675-1cd4eab6cca9-image.png

        My advise : don't use the GUI for the more 'complex' commands.
        Ok for a

        ls -al /
        

        and that's it.
        Use the command line, console or better : SSH access.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

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