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

    Arpwatch PHP error

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    4 Posts 2 Posters 1.8k 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.
    • I
      iamzam
      last edited by

      I'm not sure if this is the right place to put this but here goes:

      My pfsense version:

      2.1-BETA0 (amd64)
      built on Tue Nov 6 00:59:52 EST 2012
      FreeBSD pfsense 8.3-RELEASE-p4 FreeBSD 8.3-RELEASE-p4 #1: Tue Nov 6 01:30:39 EST 2012 root@snapshots-8_3-amd64.builders.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_SMP.8 amd64
      

      arpwatch (at least for AMD64) seems to run fine and reports are generated into the reports tab.

      I discovered a php error on the reports page, when you hit the "Clear Log" button you get a blank page with only:

      Fatal error: Call to undefined function stop_service() in /usr/local/www/arpwatch_reports.php on line 37

      when you get back to the index.php there is now a crash report:

      "pfSense has detected a crash report or programming bug. Click here for more information."

      here is the contents of the crash report:

      Crash report begins.  Anonymous machine information:
      
      amd64
      8.3-RELEASE-p4
      FreeBSD 8.3-RELEASE-p4 #1: Tue Nov  6 01:30:39 EST 2012     root@snapshots-8_3-amd64.builders.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_SMP.8
      
      Crash report details:
      
      PHP Errors:
      [06-Nov-2012 14:04:33 UTC] PHP Fatal error:  Call to undefined function stop_service() in /usr/local/www/arpwatch_reports.php on line 37
      
      

      I solved this by adding the below line to /usr/local/www/arpwatch_reports.php

      require_once("service-utils.inc");
      

      here is a patch:

      *** /usr/local/www/arpwatch_reports.php Tue Nov  6 08:57:01 2012
      --- arpwatch_reports.php        Tue Nov  6 09:18:30 2012
      ***************
      *** 28,37 ****
      --- 28,38 ----
                ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                POSSIBILITY OF SUCH DAMAGE.
        */
      
        require("guiconfig.inc");
      + require_once("service-utils.inc");
      
        $logfile = "/var/log/arp.dat";
      
        if ($_POST['clear']) {
                stop_service("arpwatch");
      
      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I committed that fix, should be up shortly (but I didn't do a version bump)

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • I
          iamzam
          last edited by

          hey JimP i just tried this again ( https://pfsense-ip/arpwatch_reports.php –> click "clear log" button" --> get php error )

          I still get the error as of today's build:

          2.1-BETA0 (amd64)
          built on Wed Nov 28 10:58:00 EST 2012
          FreeBSD 8.3-RELEASE-p5

          I have also tried to uninstall the arpwatch package and reinstall it, same effect.

          Fatal error: Call to undefined function stop_service() in /usr/local/www/arpwatch_reports.php on line 37

          Should this be fixed by now?  I know this is not a big deal, I just figure that you forgot about it and I like to feel like I am contributing wherever my limited skills allow me.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I remember committing it but it must not have been pushed back to the repo. I can't find any trace of it here. I did it again and confirmed that it pushed this time.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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