Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    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.1k 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

      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
      • BBcan177B
        BBcan177 Moderator
        last edited by

        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

          Thanks a lot!!!

          That solved it.

          1 Reply Last reply
          Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
          Privacy Policy · Cookie Policy