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

Captiveportal pre-auth redirect URL not working in 2.3

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
3 Posts 2 Posters 2.0k 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.
  • J
    jancolle
    last edited by Apr 13, 2016, 2:11 PM

    After upgrading to 2.3, CP doesn't work when using pre-auth redirect URL.

    This is what is shown in the browser.:

    Fatal error: Cannot redeclare platform_booting() (previously declared in /etc/inc/globals.inc:208) in /etc/inc/globals.inc on line 208 Call Stack: 0.0001 226464 1. {main}() /usr/local/captiveportal/index.php:0 0.0223 2982888 2. portal_reply_page() /usr/local/captiveportal/index.php:262 0.0223 2983160 3. get_include_contents() /etc/inc/captiveportal.inc:1943 0.0223 3001008 4. include('/var/etc/captiveportal_guest.html') /etc/inc/pfsense-utils.inc:2356 PHP ERROR: Type: 1, File: /etc/inc/globals.inc, Line: 208, Message: Cannot redeclare platform_booting() (previously declared in /etc/inc/globals.inc:208)

    I have this in the top of my portal page.:

    require("globals.inc");
    $request_uri = urldecode(str_replace("/index.php?redirurl=", "",  $_SERVER["REQUEST_URI"]));
    $portal_redirurl = urldecode("$PORTAL_REDIRURL$");
    if(!stristr(urldecode("$PORTAL_REDIRURL$"), $request_uri)) {
        Header("Location: $PORTAL_REDIRURL$");
        exit;
    }
    ?>

    Any idea what's missing after the upgrade ?

    1 Reply Last reply Reply Quote 0
    • B
      BBcan177 Moderator
      last edited by Apr 13, 2016, 2:14 PM

      Change the line:

      require("globals.inc");

      to

      require_once("globals.inc");

      "Experience is something you don't get until just after you need it."

      Website: http://pfBlockerNG.com
      Twitter: @BBcan177  #pfBlockerNG
      Reddit: https://www.reddit.com/r/pfBlockerNG/new/

      1 Reply Last reply Reply Quote 0
      • J
        jancolle
        last edited by Apr 13, 2016, 3:01 PM

        Thanks a lot!!!

        That solved it.

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