Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    php fatal error in /usr/local/www/diag_command.php

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 4 Posters 314 Views 4 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.
    • C Offline
      Cabledude
      last edited by

      Hi all,

      Never seen this one before:

      Crash report details:
      
      PHP Errors:
      [21-Aug-2026 20:55:51 Europe/Amsterdam] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/www/diag_command.php on line 174
      [21-Aug-2026 20:59:46 Europe/Amsterdam] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/local/www/diag_command.php on line 174
      

      I searched this forum for fatal errors in diag_command.php but nothing came up. What should I do about this?

      Thanks!

      Pete
      Home: SG-2100 + UniFi + Synology. SG-1100 retired
      Parents: SG-1100 + UniFi + Synology
      Testing: SG-1100 w/ 120GB SSD via ext USB (eMMC dead). Works great

      patient0P 1 Reply Last reply Reply Quote 0
      • patient0P Offline
        patient0 @Cabledude
        last edited by

        @Cabledude on what pfSense (Plus?) version are you and what command did you run in Diagnostics / Command Prompt?

        1 Reply Last reply Reply Quote 0
        • C Offline
          Cabledude
          last edited by Cabledude

          hi @patient0 , thank you so much for replying to my issue, I really appreciate that 🙂

          I have a Netgate 2100 and I am running pfsense plus 25.11.1.
          I have not run any commands in Diagnostics / Command Prompt yet. I haven't ever seen such warnings in many years of using pfsense, so that is why I posted this.

          I am using pfblocker (python mode), openvpn, ipsec, arpwatch, avahi, HAProxy.

          Pete
          Home: SG-2100 + UniFi + Synology. SG-1100 retired
          Parents: SG-1100 + UniFi + Synology
          Testing: SG-1100 w/ 120GB SSD via ext USB (eMMC dead). Works great

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

            @Cabledude said in php fatal error in /usr/local/www/diag_command.php:

            I have not run any commands in Diagnostics / Command Prompt yet.

            You clicked on the menu Diagnostics > Command Prompt and it throws an error like that ?
            Hummm.

            You have to look it up in the forum if that 25.11.1 pfSense plus has an issue like that, as I don't recall anything like that. I, and many others, have been using 25.11.1 in the past, but today, you are the only one left.
            We all upgraded to a newer version and the one that came after that, and we upgraded again, and now we use 26.07.
            The good news is : 26.07, and 26.03.1 before, and the version before : no issue what so ever.

            No "help me" PM's please. Use the forum, the community will thank you.

            1 Reply Last reply Reply Quote 1
            • stephenw10S Offline
              stephenw10 Netgate Administrator
              last edited by

              That error is pretty much always because the output of the command run there was too large.

              However above is shows on 20k being allocated so it could just be the php memory was already very close to the limit.

              1 Reply Last reply Reply Quote 1
              • C Offline
                Cabledude
                last edited by

                Okay I said I didn’t use the command prompt and that was true for that day but I did use it the day before to get a tcpdump. So now that you all link the error to the command prompt that has to be it.

                Yes @Gertjan I am a little cautious when it comes to updating to new pfsense plus versions. Usually I wait a bit to see if there are any issues for my particular netgate model. I’m the only one left, very funny, but I do get the point you’re trying to make.

                I will update to 26.3(.1).

                As for this error, can I just hit “delete the crash report data and return to the dashboard” and be done with it?

                Thanks

                Pete
                Home: SG-2100 + UniFi + Synology. SG-1100 retired
                Parents: SG-1100 + UniFi + Synology
                Testing: SG-1100 w/ 120GB SSD via ext USB (eMMC dead). Works great

                stephenw10S GertjanG 2 Replies Last reply Reply Quote 0
                • stephenw10S Offline
                  stephenw10 Netgate Administrator @Cabledude
                  last edited by

                  @Cabledude said in php fatal error in /usr/local/www/diag_command.php:

                  As for this error, can I just hit “delete the crash report data and return to the dashboard” and be done with it?

                  Yes. 😉

                  Yes if you ran a pcap using the command prompt page and forgot to set a packet limit for example. Then it will just run continually in the background until something is exhausted.

                  1 Reply Last reply Reply Quote 1
                  • GertjanG Offline
                    Gertjan @Cabledude
                    last edited by

                    @Cabledude said in php fatal error in /usr/local/www/diag_command.php:

                    I did use it the day before to get a tcpdump

                    Diagnostics > Command Prompt use PHP to execute commands in a sub 'console' shell.

                    This means that that console shell can use memory that was allocated by the parent process for this console 'shell' process, in this case PHP.
                    PHP uses a couple of megas maximum, and not the 'all avaible system memory' or RAM as that would create a dangerous situation.

                    The Diagnostics > Command Prompt is nice for a small command with little returned output like

                    ls -al /root
                    

                    A command like tcpdump can produce a massive output, and you overflow PHP's memory : in fails with an OOM error.

                    Diagnostics > Packet Capture has been created so the output goes to a file, and not fed back into PHP.

                    Activate SSH and use the real command line. Why settle for a crappy fake command line if you can have the real thing ? ^^

                    No "help me" PM's please. Use the forum, the community will thank you.

                    C 1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cabledude @Gertjan
                      last edited by

                      @Gertjan said in php fatal error in /usr/local/www/diag_command.php:

                      Activate SSH and use the real command line. Why settle for a crappy fake command line if you can have the real thing ? ^^

                      Dank je wel Gertjan for your explanation. I actually followed a tutorial to see the tcpdump. And I have used Packet Capture in the past so I could have tried that instead, you are right.
                      I have used SSH before, but not the command line much, only occasionally, so I don't feel as confident as many here. But there are always new things to learn.

                      Pete
                      Home: SG-2100 + UniFi + Synology. SG-1100 retired
                      Parents: SG-1100 + UniFi + Synology
                      Testing: SG-1100 w/ 120GB SSD via ext USB (eMMC dead). Works great

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                      Privacy Policy · Cookie Policy