php fatal error in /usr/local/www/diag_command.php
-
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 174I searched this forum for fatal errors in diag_command.php but nothing came up. What should I do about this?
Thanks!
-
@Cabledude on what pfSense (Plus?) version are you and what command did you run in Diagnostics / Command Prompt?
-
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.
-
@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. -
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.
-
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
-
@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.
-
@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 /rootA 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 ? ^^
-
@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.
Privacy Policy · Cookie Policy