PHP question

Status
Not open for further replies.

Techwhore

Smack-Fu Master, in training
79
I've written a script for my workplace to replace the old command line login with a web interface one. The meat of the script is:

exec ("ssh -l $username $hostname $password $script), $array, $return_code);

What determines the value of $return_code? Is it the Unix cluster i'm loggin into or PHP? Whichever it is how do i go about finding what the code means? It kicks back 255, which must be a failed code because i can't possible succeed in doing this from my current location based on the way in which $script is written.

Thanks in advance.
 

Techwhore

Smack-Fu Master, in training
79
I checked the Apache error log and noticed that when i submit data i get this:

Could not create directory '/var/www/.ssh'.^M
Aborted by user!^M


Something's obviously wrong with the exec line that i've written. I realize that I mistyped it above so i'll re-post it now:

exec ("ssh -l $username $hostname $password $signin exit", $array, $return_code);


Maybe the exec command isn't what I should be using?
 
Status
Not open for further replies.