Installing a simple CGI script
-
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
-
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 likehead.inc
andfoot.inc
and the same basic page structure with panels and such.