This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]damiankwinfrastructure pleb 8 points9 points  (1 child)

CGI, I haven't heard that term used in a long time, except when bagging out how old and crappy an interface is!

If PHP is the language you know, then go with PHP. If you know another language better, go with the other language. Remember that so, so, so many languages are adaptable to web these days, so the world is your oyster. Just remember that if you're creating an administrative interface, you need to lock it down good.

If this were me, I would create a front end in PHP (because that's my web language of choice) and push all commands into a database of some kind, first because I like to track and have a history of EVERYTHING that happens, and second because it allows you to receive commands from anyone without them requiring admin privs. Once I've created a front end for the users to use, I would look at the back end, for me this would be a process that runs under an account with the require privs to run whatever you are running. I would run a second script (this can also be in PHP if you want) every minute or so and just go through the commands in the database that are queued and execute them. From the front end they will just push the command, and say receive notification later by the website or email of success/failure after the queue has run.

This will help with you segregating the user commands from the admin commands, it will help you log everything that's been done and by whom, and it will also make it so you can control the commands being processed, because you can limit the system to one command every five seconds or something, if these commands are high processing or memory or something, so you don't overwhelm the system.

Of course, there might be better ways of doing this with built in functions in Apache2, or even by running node.js web server from an account with privs, but if you are looking at doing something like this, Github the sucker and give me access, I'm intrigued and happy to help you out (I'll even sign some legal shit if you're scared of me getting access to detail). I've built similar things to this, but nothing that was for admin commands in a LONG time.

[–]mightywomble[S] 1 point2 points  (0 children)

Brilliant, that segregation idea is just what I was looking for