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

PHP error log - Had to reboot

Scheduled Pinned Locked Moved General pfSense Questions
16 Posts 2 Posters 1.4k 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.
  • W
    Wylbur @stephenw10
    last edited by Nov 9, 2023, 3:39 PM

    @stephenw10

    I have put on No patches at all.

    But I will take your advice and put on these patches as soon as I can. Probably sometime this weekend.

    W 1 Reply Last reply Nov 15, 2023, 12:19 AM Reply Quote 1
    • W
      Wylbur @Wylbur
      last edited by Nov 15, 2023, 12:19 AM

      @Wylbur

      Forgot to update. Patches on. Also enabled SNORT.

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Nov 15, 2023, 1:17 AM

        Are you still seeing that error regenerated?

        W 1 Reply Last reply Nov 15, 2023, 1:27 AM Reply Quote 0
        • W
          Wylbur @stephenw10
          last edited by Nov 15, 2023, 1:27 AM

          @stephenw10
          Intermittently. Finally found a dual port Intel based adapter -- will get it next week.

          It seems related to a web site that is using PHP and has a problem. May just be a coincidence.

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Nov 15, 2023, 2:04 PM

            I think you need to check what's actually on line 1316 in /etc/inc/util.inc. You might have some file corruption.
            It's hard to see how that error would happen in the expected file contents.

            Steve

            W 1 Reply Last reply Nov 20, 2023, 7:19 PM Reply Quote 0
            • W
              Wylbur @stephenw10
              last edited by Nov 20, 2023, 7:19 PM

              @stephenw10
              Sorry for the delay.

              I have not seen that PHP error lately. But if I go back to that PHP based web site, it might trigger it again (I have no idea why).

              I can't see a way to get the info via gui. So I'm going to need to get some time to get a monitor and keyboard to the comm closet so I can do the CLI stuff (which I'm just OK with). I'm not a real Linux admin. And then, I have to find a way to capture the output to post it here.

              Meanwhile/BTW -- I was able to get a 2 port 1GB Intel adapter and get it installed and configured. So far so good.

              And I have SNORT running (got a non-commercial key for testing).

              1 Reply Last reply Reply Quote 0
              • S
                stephenw10 Netgate Administrator
                last edited by Nov 20, 2023, 8:30 PM

                Which site is that? Visiting some website shouldn't make any difference to anything happening in pfSense.

                You can just open the file ( /etc/inc/util.inc) in Diag > File Edit and then go to the line directly.

                W 1 Reply Last reply Nov 20, 2023, 10:21 PM Reply Quote 0
                • W
                  Wylbur @stephenw10
                  last edited by Nov 20, 2023, 10:21 PM

                  @stephenw10

                  Thanks, I had missed that handy little tool in Diagnostics:

                  Here is what it contains, and I may have gone a bit further than needed, but I wanted to get to what I thought would be end of stanza/paragraph (how ever it is called -- BTW - what language is this?)

                  foreach ($ports as $port) {
                  	if (($kflc) && (strpos($port, '#') === 0)) {	// Keep Full Line Comments (lines beginning with #).
                  		$comments[] = $port;
                  	} else if (is_portrange($port)) {
                  		list($begin, $end) = explode(":", $port);
                  		if ($begin > $end) {
                  			$aux = $begin;
                  			$begin = $end;
                  			$end = $aux;
                  		}
                  		for ($i = $begin; $i <= $end; $i++) {
                  			if (!in_array($i, $uniq)) {
                  				$uniq[] = $i;
                  			}
                  		}
                  	} else if (is_port($port)) {
                  		if (!in_array($port, $uniq)) {
                  			$uniq[] = $port;
                  		}
                  	}
                  }
                  sort($uniq, SORT_NUMERIC);
                  
                  $result = array();
                  foreach ($uniq as $idx => $port) {
                  	if ($idx == 0) {
                  		$result[] = $port;
                  		continue;
                  	}
                  
                  	$last = end($result);
                  	if (is_portrange($last)) {
                  		list($begin, $end) = explode(":", $last);
                  	} else {
                  		$begin = $end = $last;
                  	}
                  
                  	if ($port == ($end+1)) {
                  		$end++;
                  		$result[count($result)-1] = "{$begin}:{$end}";
                  	} else {
                  		$result[] = $port;
                  	}
                  }
                  
                  return array_merge($comments, $result);
                  

                  }

                  1 Reply Last reply Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Nov 20, 2023, 10:50 PM

                    It's PHP.

                    Hmm, that line looks to be as expected:
                    https://github.com/pfsense/pfsense/blob/RELENG_2_7_0/src/etc/inc/util.inc#L1316

                    In which case that error really doesn't make sense.

                    Are you still seeing it regenerated? And only when you visit some specific page?

                    W 1 Reply Last reply Nov 21, 2023, 12:28 AM Reply Quote 0
                    • W
                      Wylbur @stephenw10
                      last edited by Nov 21, 2023, 12:28 AM

                      @stephenw10

                      I haven't seen it since I put on the maint patches, come to think of it. Hmmmmm.

                      I'll post back if I see it again. I do tend to review the logs every few days.

                      1 Reply Last reply Reply Quote 1
                      16 out of 16
                      • First post
                        16/16
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                        This community forum collects and processes your personal information.
                        consent.not_received