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

    Installing a simple CGI script

    Scheduled Pinned Locked Moved Development
    2 Posts 2 Posters 378 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.
    • ?
      A Former User
      last edited by

      Hello!

      I am trying to figure out how to install a simple php page with a textbox and submission button. The goal is to enter a list of text, format it, append it to a custom configuration file on the backend, and call the unbound-control command. I researched package development, but it seems over the top for what I am trying to do.

      Would I be able to add it to the www directory and call the URL manually rather than through the WebCFG? Or, should I go out of my way to make a custom package? If you suggest the latter, do you have any suggestions on how to get started (outside of the documentation)?

      Thank you

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

        If you drop the file in as-is then it could be run by anyone without logging in, which would be a giant security hole.

        Anything you want to do could probably be done with enough coding, but if you want to do it securely, then you should look at similar pages from the GUI and other packages and look at what they have in common. If you include the standard set of required files it will do auth and other things for you automatically. At a minimum you'll need the require lines, plus other parts like head.inc and foot.inc and the same basic page structure with panels and such.

        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.