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

PHP Error putting a grep command

webGUI
2
2
185
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 Feb 14, 2025, 4:19 PM

    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.

    G 1 Reply Last reply Feb 18, 2025, 8:44 AM Reply Quote 0
    • G
      Gertjan @sammiorelli
      last edited by Feb 18, 2025, 8:44 AM

      @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 :

      login-to-view

      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
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.