exec() call to external program
We are trying to use the exec() or system() calls in a php script. The program we are trying to call takes 1 parameter in the form of: email@example.com[usercode]
There are no spaces in the parameter at all and we have tried placing quotes around just to see if it mattered. We have also modified the parameter just to send it hello. Here is what we get:
With no parameters the php script executes the program where it displays the error message from the program stating that not enough parameters were supplied. We then add the word "hello" to the end after a space so the command looks like this: command "hello" and the program no longer executes at all. No matter what we do, if we supply an argument to the command the php code will not execute the program.
Did this at the command line and it works but not in our script Any ideas?
//build our command we want to execute
$cmd = "/usr/local/spamnit/bin/spamnitconfirm1 firstname.lastname@example.org";
//call spamnitconfirm to take care of the user
system( $cmd );
If this worked at the command line and not on my php page, do I need to change a setting in php?
Thank you for your time.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)