The pfSense Store

Author Topic: return_gateway_groups_array undefined in 20120603-1959 build  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

Online phil.davis

  • Hero Member
  • *****
  • Posts: 2353
  • Karma: +3/-0
    • View Profile
    • International Nepal Fellowship
I just downloaded http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/i386/pfSense_HEAD/nanobsd/pfSense-2.1-DEVELOPMENT-2g-i386-nanobsd-20120603-1959.img.gz and wrote it to a CF card and put it in my test ALIX box. On logging in and starting the wizard I get:

Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774

If I try again and don't use the wizard, and go to System:General Setup , same error message. Almost anything selected from the menu gives this error, including Diagnostics:Edit File - making it difficult to try and fix things up. The GUI is as good as useless.

It looks like a number of files might need:
require_once("gwlb.inc");

like the recent change to rc.banner, which is in this build.
Then interfaces.inc will be able to find return_gateway_groups_array()

I think this will be a problem for anyone updating to this build?
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline podilarius

  • Hero Member
  • *****
  • Posts: 1768
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #1 on: June 04, 2012, 06:28:52 am »
I had this also, but I have loaded up the latest snap and it seems to be working as expected now.

Offline D1M0N

  • Jr. Member
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #2 on: June 04, 2012, 06:34:17 am »
I have this problem too
2.1-BETA0  (amd64) built on Wed Jun 6
USB Flash drive 4GB system disk
Intel Atom CPU D410 @ 1.66GHz + D410PT miniITX Board + 1GB DDR2
WAN - Onboard Card; LAN - D-Link DGE-530T; WIFI - D-Link DWA-140
HDD 1000GB + samba-3.3.13 + transmission-daemon

Online phil.davis

  • Hero Member
  • *****
  • Posts: 2353
  • Karma: +3/-0
    • View Profile
    • International Nepal Fellowship
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #3 on: June 04, 2012, 06:36:57 am »
I used "ee" editor from the console to edit /etc/inc/interfaces.inc and comment out the offending chunk of code in get_failover_interface :

$a_groups = return_gateway_groups_array();
if(is_array($a_groups[$interface])) {
  /* we found a gateway group, fetch the interface or vip */
  if($a_groups[$interface][0]['vip'] <> "")
    $wanif = $a_groups[$interface][0]['vip'];
  else
    $wanif = $a_groups[$interface][0]['int'];

  return $wanif;
}

Removing this recently-added call to return_gateway_groups_array prevents the fatal error, and so I can now use the GUI Wizard and configure things.
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline ineti

  • Jr. Member
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #4 on: June 04, 2012, 06:44:02 am »
same bug here

Offline elvisnld

  • Jr. Member
  • **
  • Posts: 28
  • Karma: +0/-0
  • Pfsense rocks!
    • View Profile
    • Work work work ..
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #5 on: June 04, 2012, 06:44:34 am »
I had this also, but I have loaded up the latest snap and it seems to be working as expected now.

Uhm ..

but the one mentioned as 'broken' seems to be the latest (build yesterday 19:11 PM)  ;D
I hate to do an russian-roulette to an earlier version earlier which does basiclly work ..

Removing the offending part does work for now though.



« Last Edit: June 04, 2012, 06:52:09 am by elvisnld »
No!, i will *not* fix your computer ..

Online phil.davis

  • Hero Member
  • *****
  • Posts: 2353
  • Karma: +3/-0
    • View Profile
    • International Nepal Fellowship
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #6 on: June 04, 2012, 06:51:54 am »
The commit "Always add a link-local of fe80::1:1 when the interface is set to track" has also short-circuited some of the code in get_failover_interface - so I guess that has got into the snap http://snapshots.pfsense.org/FreeBSD_RELENG_8_3/i386/pfSense_HEAD/nanobsd/pfSense-2.1-DEVELOPMENT-2g-i386-nanobsd-20120604-0057.img.gz that just appeared.

But I suspect that if the code runs down into the call to return_gateway_groups_array in future, then the undefined function fatal error can happen again, depending on if the calling path knows about gwlb.inc

I see that smos has made a few other changes since that, including one which had a 1-char typo that was quickly fixed. So I'm not too sure what got into that latest snap. I'll look again for a later snapshot that I can be confident has a consistent good set of commits in it.
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline yon

  • Full Member
  • ***
  • Posts: 184
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #7 on: June 04, 2012, 06:54:18 am »
me too. I haveto re-install pf system.

Online phil.davis

  • Hero Member
  • *****
  • Posts: 2353
  • Karma: +3/-0
    • View Profile
    • International Nepal Fellowship
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #8 on: June 04, 2012, 07:10:59 am »
To smos/databeestje: if you notice this post, when you are finished doing the group of changes you are currently committing and have what you think is a good consistent point to snapshot, can you kick off a build and reply here?
I am happy to try it out tomorrow (Tuesday 5/6 Nepal time) on a test system - I just would like to know that the snapshot build has a consistent set of code to test, and that you are not half-way through doing something.
« Last Edit: June 04, 2012, 07:16:17 am by phil.davis »
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline D1M0N

  • Jr. Member
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #9 on: June 04, 2012, 07:58:23 am »
I used "ee" editor from the console to edit /etc/inc/interfaces.inc and comment out the offending chunk of code in get_failover_interface :

$a_groups = return_gateway_groups_array();
if(is_array($a_groups[$interface])) {
  /* we found a gateway group, fetch the interface or vip */
  if($a_groups[$interface][0]['vip'] <> "")
    $wanif = $a_groups[$interface][0]['vip'];
  else
    $wanif = $a_groups[$interface][0]['int'];

  return $wanif;
}

Removing this recently-added call to return_gateway_groups_array prevents the fatal error, and so I can now use the GUI Wizard and configure things.



thanx, i change this file too ))
its work
2.1-BETA0  (amd64) built on Wed Jun 6
USB Flash drive 4GB system disk
Intel Atom CPU D410 @ 1.66GHz + D410PT miniITX Board + 1GB DDR2
WAN - Onboard Card; LAN - D-Link DGE-530T; WIFI - D-Link DWA-140
HDD 1000GB + samba-3.3.13 + transmission-daemon

Offline podilarius

  • Hero Member
  • *****
  • Posts: 1768
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #10 on: June 04, 2012, 08:46:08 am »
This was already fixed. If you don't have the latest, please try that. If you cannot get to the autoupdate, it is also available from the console menu. After upgrade to the latest, I didn't have any problems.

Offline podilarius

  • Hero Member
  • *****
  • Posts: 1768
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #11 on: June 04, 2012, 09:40:35 am »
Just realized I have gitsync turned on. So that after a new binary pull, I have it sync up with the git repos.

Offline databeestje

  • Administrator
  • Hero Member
  • *****
  • Posts: 1048
  • Karma: +0/-0
  • It just might be your luck day, if you only knew.
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #12 on: June 04, 2012, 02:28:56 pm »
just added the include to gwlb.inc in interfaces.inc.

Really not sure what is up with PHP and it's including of files and somehow ending up not finding the function. Very weird. I wasn't expecting this much fallout... wow.

Online phil.davis

  • Hero Member
  • *****
  • Posts: 2353
  • Karma: +3/-0
    • View Profile
    • International Nepal Fellowship
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #13 on: June 05, 2012, 02:23:57 am »
My test Alix system is running:
2.1-BETA0 (i386)
built on Mon Jun 4 17:06:08 EDT 2012
FreeBSD 8.3-RELEASE-p2

I have been installing Squid and SquidGuard. Some error occurred that the dashboard wanted to tell me about:
pfSense has detected a crash report or programming bug. Click here for more information.

I click on the link and it tries to go to the crash_reporter code at:
https://192.168.1.1/crash_reporter.php

But gets the following error:
Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774

I have all the code that I can see committed in GitHub. Including:
require_once("gwlb.inc");
in the top part of interfaces.inc

So, there are still ways that the system cannot find return_gateway_groups_array()
If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

Offline weekleyj

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #14 on: June 05, 2012, 07:24:28 am »
Also in system_firmware_check.php.

Offline Deimos

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #15 on: June 05, 2012, 01:20:44 pm »
Code: [Select]
Fatal error: Call to undefined function return_gateway_groups_array() in /etc/inc/interfaces.inc on line 4774
Also when going to system_gateways.php

  ;D

pfSense Build Above
Quote
2.1-BETA0 (i386)
built on Tue Jun 5 03:06:23 EDT 2012
FreeBSD router 8.3-RELEASE-p2 FreeBSD 8.3-RELEASE-p2 #1: Tue Jun 5 04:09:00 EDT 2012 root@FreeBSD_8.3_pfSense_2.1.snaps.pfsense.org:/usr/obj./usr/pfSensesrc/src/sys/pfSense_SMP.8 i386

Offline podilarius

  • Hero Member
  • *****
  • Posts: 1768
  • Karma: +0/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #16 on: June 05, 2012, 02:10:14 pm »
I am running the same version and I am not having these troubles. Are you syncing with git?

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: return_gateway_groups_array undefined in 20120603-1959 build
« Reply #17 on: June 05, 2012, 02:10:54 pm »
I am also on the latest snap and not having any issues at all.

Be sure you clear the cache or force a page reload after getting an error like that.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!