I am developing a PHP, web-based "front-end" for a command line tool we use here at work. Users log in to this tool and, once logged in, can do a number of things.
I am currently using the backtick operator to issue the actual login command. But, as soon as the browser changes from my login page to the main application page, PHP seems to "forget" that the login ever occurred. As such, subsequent commands that get issued return an error that "no login session has been established".
I noticed this morning (after crashing our test server) that there were a number of "CMD.exe" processes running in the background, leaving me to believe that PHP is spawning a separate shell process for each command issued.
How can I issue the shell command to log users in, and then essentially keep my application in that shell space (so that it remembers that the user is logged in)? Is the backtick operator the wrong way to issue these commands?
Edit: I should also mention that I am using sessions in my application. Apparently, that might be a cause of the problem as well.
I am currently using the backtick operator to issue the actual login command. But, as soon as the browser changes from my login page to the main application page, PHP seems to "forget" that the login ever occurred. As such, subsequent commands that get issued return an error that "no login session has been established".
I noticed this morning (after crashing our test server) that there were a number of "CMD.exe" processes running in the background, leaving me to believe that PHP is spawning a separate shell process for each command issued.
How can I issue the shell command to log users in, and then essentially keep my application in that shell space (so that it remembers that the user is logged in)? Is the backtick operator the wrong way to issue these commands?
Edit: I should also mention that I am using sessions in my application. Apparently, that might be a cause of the problem as well.
