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

Simple PHP with CP… But

Scheduled Pinned Locked Moved Captive Portal
4 Posts 1 Posters 802 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.
  • M
    mercato
    last edited by Jun 12, 2015, 11:02 AM

    hello, we have a very simple CP with no authentication.

    on our test webserver the PHP code works fine, from our index.php the CP users are redirected to a specific website (which includes their name on the page) and their name & email are written to a CSV file

    however when this index.php is uploaded to pfSense, neither of those 2 things happen.

    Here is the PHP code copied to a txt file, does anyone have comments please?

    index-php.txt

    1 Reply Last reply Reply Quote 0
    • M
      mercato
      last edited by Jun 12, 2015, 11:18 AM

      I have noticed a very basic error (I'm not the coder)
      requirement = Include a form (POST to "$PORTAL_ACTION$") with a submit button (name="accept") and a hidden field with name="redirurl" and value="$PORTAL_REDIRURL$".

      Our index.php has action=""
      and we have omitted action="$PORTAL_ACTION$"

      1 Reply Last reply Reply Quote 0
      • M
        mercato
        last edited by Jun 12, 2015, 11:53 AM

        well we substituted action="$PORTAL_ACTION$" for what was there originally, no difference

        1 Reply Last reply Reply Quote 0
        • M
          mercato
          last edited by Jun 12, 2015, 3:54 PM

          just to clarify,
          yes the "After authentication Redirection URL" field in CP config works, to the extent that I can nominate a web a page to bring the user to.
          But ideally we require to insert the user name on that page as you see from our PHP code. And that works fine on our test web server (not pfSense) when we use our own redirect coding

          I would like to know if there is a way to pass a variable to the "After authentication Redirection URL" to achieve what we want to do
          www.hayfieldmanor.ie/wifi-landing-page?user=$fname

          And secondly with the user data we capture on the index.php to write the data to captiveportal-data.csv, again our code works on a regular webserver but not when uploaded to pfSense

          Does anyone know what we should do to tweak things and get it working on pfSense?

          Thanks

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