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

The firewall has enountered an error - PHP Errors

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 2.9k 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.
  • G
    g405tsh311
    last edited by May 18, 2021, 4:01 AM

    After logging into pfSense to day I received the error reported above.
    The complete error message is:
    Crash report begins. Anonymous machine information:

    amd64
    12.2-STABLE
    FreeBSD 12.2-STABLE 1b709158e581(RELENG_2_5_0) pfSense

    Crash report details:

    Debugging output can be collected to share with pfSense developers or others providing support or assistance.

    Inspect the contents to ensure this information is acceptable to disclose before distributing these files.
    PHP Errors:
    [16-May-2021 18:27:29 America/New_York] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 268435464 bytes) in /usr/local/www/diag_command.php on line 174

    No FreeBSD crash data found.

    Seems to be a bug in PHP.
    Any advice on how to proceed?

    Thank you in advance you valuable contributions.

    G 1 Reply Last reply May 18, 2021, 6:38 AM Reply Quote 0
    • G
      Gertjan @g405tsh311
      last edited by Gertjan May 18, 2021, 6:41 AM May 18, 2021, 6:38 AM

      @g405tsh311 said in The firewall has enountered an error - PHP Errors:

      Allowed memory size of 536870912 bytes exhausted

      Classic.
      You were visiting html a page, that uses PHP scripting code, and the production of that page needed more then 536 Mbytes.
      That produced a failure, as PHP isn't allowed to use that quantity of memory.

      Wheh I visit that page :

      https://pfsense.my-network.net/diag_command.php

      I just see :

      f5bc979c-03cf-4984-af36-eccd1f2b620d-image.png

      The total size is just over 5 Kbytes. Not 539 MBytes.

      So : what did you really do ?

      And a free tip of the day : never ever use this page.
      Need to type commands ? (yes, you need to type commands on that page) then use the real thing that doesn't blow up thing, or hide things from you that might other wise be very useful to see :
      Use the console or even better : SSH access.

      Using username "admin".
      Authenticating with public key "rsa-key-20150201"
      Passphrase for key "rsa-key-20150201":
      pfSense - Netgate Device ID: b87954894de94bdf9fa0
      
      *** Welcome to pfSense 2.5.1-RELEASE (amd64) on pfsense ***
      
       WAN (wan)       -> em0        -> v4/DHCP4: 192.168.10.3/24
       LAN (lan)       -> em1        -> v4: 192.168.1.1/24
                                        v6: 2001:470:dead:5b0:2::1/64
       PORTAL (opt1)   -> em2        -> v4: 192.168.2.1/24
       HENETV6 (opt2)  -> gif0       -> v6: 2001:470:dead:5b0::2/128
       LAN10001 (opt3) -> em3        -> v4: 10.0.0.1/24
       EXPESSVPN (opt4) -> ovpnc2     ->
       OPENVPN (opt5)  -> ovpns1     -> v4: 192.168.3.1/24
                                        v6: 2001:470:beef:ffff::1/64
      
       0) Logout (SSH only)                  9) pfTop
       1) Assign Interfaces                 10) Filter Logs
       2) Set interface(s) IP address       11) Restart webConfigurator
       3) Reset webConfigurator password    12) PHP shell + pfSense tools
       4) Reset to factory defaults         13) Update from console
       5) Reboot system                     14) Disable Secure Shell (sshd)
       6) Halt system                       15) Restore recent configuration
       7) Ping host                         16) Restart PHP-FPM
       8) Shell
      
      Enter an option:
      

      Hit '8' and enter and now you have 'all the power' and no PHP failures ;)

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

      G 1 Reply Last reply May 19, 2021, 2:30 AM Reply Quote 0
      • G
        g405tsh311 @Gertjan
        last edited by May 19, 2021, 2:30 AM

        @gertjan

        I am not sure if you read my post and understood what I wrote.
        I logged into the pfSense and that message was present as an announcement in the dashboard section as an announcement bar.

        If PHP is not allowed to use passed 536 Mbytes and the mem was exhausted, then it was a cause, correct? What was the root cause for the error? Is it a bug no allowing memory recycling or possibly a memory leak somewhere? Obviously it didn't happened just cause a logon to the FW.

        While I am aware that the CLI via SSH is available and it is fully functional, then, why in the planet would you waste time to create a diag page that allegedly has a bug???

        I keep seen these ridiculous answers more and more on applications like this. If you don't know where the bug is, or don't want to debug the issue or want to fallow the path of lease resistance, then don't create something that you are not willing to diagnose!!!!

        Your response is not a solution, it is just a work around. The issue is still there hidden on locations that many might not use.

        G 1 Reply Last reply May 19, 2021, 5:58 AM Reply Quote 0
        • G
          Gertjan @g405tsh311
          last edited by May 19, 2021, 5:58 AM

          @g405tsh311 said in The firewall has enountered an error - PHP Errors:

          I am not sure if you read my post and understood what I wrote.
          I logged into the pfSense and that message was present as an announcement in the dashboard section as an announcement bar.

          I'm pretty sure I understood your question, as the question is known / asked before.
          "pfSense recorded a PHP out of memory situation".
          While visiting the page /usr/local/www/diag_command.php on line 174 which is "Diagnostics > Command Prompt".
          Without doing anything on that page, nothing happens.

          When the error arrived, the reason and message is stored in a file, and this file 'the error event' is shown as an alert on the top of the the next time you visit the Dashboard page.
          That can be seconds, minutes, or even days later.
          The date and time of the error is known : 16-May-2021 18:27:29

          I still missunder stood the question ? That can happen. Do you have more information ?

          @g405tsh311 said in The firewall has encountered an error - PHP Errors:

          then don't create something that you are not willing to diagnose!!!!

          You asked for it : a part of the diagnose is : you issued a command that had more then 500 Mbytes of text output.
          Look at the line 174 of that file : the output of the command you entered is redirected in a file, and the quantity of that output overflows 500+ Mbytes.
          PHP goes belly up.

          There is no way of knowing how many bytes a (unknown) shell command produces upfront. So there is no safety net.

          Actually : there is one :

          fd6e67a7-54cd-4357-9df0-84b464eda1e0-image.png

          😊

          @g405tsh311 said in The firewall has enountered an error - PHP Errors:

          Your response is not a solution, it is just a work around

          True.
          A GUI type of interface will never totally replace the usage of a command line interface.
          The console access (or SSH access) always exist, for that reason.
          Mac OS still has one, as Windows 10.

          Btw : what did you do on that "Diagnostics > Command Prompt" ?

          @g405tsh311 said in The firewall has enountered an error - PHP Errors:

          then don't create something that you are not willing to diagnose!!!!

          I'm not a Netgate employee or a pfSense coder, just a pfSense user like you.

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

          G 1 Reply Last reply May 22, 2021, 3:19 AM Reply Quote 0
          • G
            g405tsh311 @Gertjan
            last edited by May 22, 2021, 3:19 AM

            @Gertjan

            That can be seconds, minutes, or even days later.
            The date and time of the error is known : 16-May-2021 18:27:29

            While the date is known, as presented by the given error, it doesn't present why this condition was given. For instance a long string or invalid string char or possibly mem exceeded error.

            I still missunder stood the question ? That can happen. Do you have more information ?

            It seems that way. I was asking how to proceed to report the bug, contrary to received a work around on how to do something that anyone with basic system knowledge can accomplished.

            You asked for it : a part of the diagnose is : you issued a command that had more then 500 Mbytes of text output.
            Look at the line 174 of that file : the output of the command you entered is redirected in a file, and the quantity of that output overflows 500+ Mbytes.
            PHP goes belly up.

            Thanks, this is very helpful and what I was looking for. An explanation of what cause a mem exhaustion is what I was looking for.

            There is no way of knowing how many bytes a (unknown) shell command produces upfront. So there is no safety net.

            Is it possible to check mem utilization and recycle the input to it? Or, perhaps, create a dynamic mem allocation instead of statically assigned?
            Unfortunately, PHP is not exactly my cup of tea.

            Actually : there is one :

            fd6e67a7-54cd-4357-9df0-84b464eda1e0-image.png

            😊

            As amusing this might look, this is not exactly a checkpoint.
            The heading won't prevent the form from crashing!! 😖
            Define advance user!!

            True.
            A GUI type of interface will never totally replace the usage of a command line interface.
            The console access (or SSH access) always exist, for that reason.
            Mac OS still has one, as Windows 10.

            Totally in agreement 1000%.

            Btw : what did you do on that "Diagnostics > Command Prompt" ?

            That is the million $$ question. The CLI is used instead of the diag page.
            Is there a way to trace back the commands ran on the given date?

            I'm not a Netgate employee or a pfSense coder, just a pfSense user like you.

            Understood!

            Thank you for all the info provided.

            1 Reply Last reply Reply Quote 0
            • R
              rosssmith
              last edited by Nov 2, 2022, 7:53 AM

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                This community forum collects and processes your personal information.
                consent.not_received