The_Lishaczek
New member
Hey there, I must make a web GUI for my certificate-generating app / a major school project / assignment / practical leaving exam.
This script works neatly on a specific Linux machine without major flaws (CLI script)
However, the only way I could think of to tackle the GUI task was a PHP form with its values getting sent to the bash script as arguments.
I can only use sudo (full privileges for sudo, it´s a school-owned and managed VM)
I could get the form inputs but I could not get them to the original script, nor any variation of it, when I tried it myself.
I know it´s not just a PHP issue as I am using sudo on almost every line (can´t do root access, because it is a school-owned VM) but I also have to consider some security measures.
I tried using escapeshellarg, exec, shell_exec ... (dunno if is even possible to achieve something with it in my case)
There´s the full Linux script as well as an index file.
Every bit of help is much appreciated, be it the code itself or the hell called Linux aftermath.
This script works neatly on a specific Linux machine without major flaws (CLI script)
However, the only way I could think of to tackle the GUI task was a PHP form with its values getting sent to the bash script as arguments.
I can only use sudo (full privileges for sudo, it´s a school-owned and managed VM)
I could get the form inputs but I could not get them to the original script, nor any variation of it, when I tried it myself.
I know it´s not just a PHP issue as I am using sudo on almost every line (can´t do root access, because it is a school-owned VM) but I also have to consider some security measures.
I tried using escapeshellarg, exec, shell_exec ... (dunno if is even possible to achieve something with it in my case)
There´s the full Linux script as well as an index file.
Every bit of help is much appreciated, be it the code itself or the hell called Linux aftermath.