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

    Custom Captive Portal Page not working after upgrade to 2.0.3

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    3 Posts 2 Posters 1.7k 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.
    • I
      islandwifibill
      last edited by

      Hi all,

      Just upgraded to 2.0.3, and reloaded the old configuration from my 2.0.1.  Funny thing - my captive portal page has been php for quite some time and worked without issue.  After the upgrade the html portion displays fine, but I get the error:

      Fatal error: Call to undefined function mysql_connect() in /var/etc/captiveportal.html

      Ok, so the captive portal is(n't) doing two things:

      1)  it renames my index-cp.php to captiveportal.html
      2)  it refuses to parse php code in that page.

      I tried simply renaming the file and got a blank screen when I roloaded the captive portal page.

      Now really folks, is this sort of thing necessary?  What happened to php in 2.0.3?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        It has always renamed the page to captiveportal.html, that's normal and it should still parse PHP code in the page there.

        MySQL support isn't enabled in PHP to start with, you have to "touch /etc/php_dynamodules/mysql" and then run /etc/rc.php_ini_setup

        PHP not activating in captive portal may be a legitimate issue though, there were some changes to the lighttpd config that might be causing that, I'll have to check into that.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          I just tried some PHP in a page on 2.0.3 and 2.1 and it worked in both places.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.