eleanor Posted August 23, 2006 Share Posted August 23, 2006 I was trying to get this tutorial to work: http://www.phpfreaks.com/tutorials/127/3.php but I keep getting this error:Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/localhost/htdocs/ssh/phpfreakSSH.inc on line 41What to do? Quote Link to comment Share on other sites More sharing options...
trq Posted August 23, 2006 Share Posted August 23, 2006 [quote]What to do?[/quote]Post your code a few lines before and a few lines after line 41. Quote Link to comment Share on other sites More sharing options...
eleanor Posted August 23, 2006 Author Share Posted August 23, 2006 39 // Build the local command executed on this server. 40 $cmd = $this->ssh_cmd . ' -n -F '.$config_file.' -i '.$sshkey.' '; 41 $cmd .= $this->user.'@'.$this->host.' ''.$command.'' > /dev/null &'; 42 43 exec($cmd); Quote Link to comment Share on other sites More sharing options...
SammyP Posted August 23, 2006 Share Posted August 23, 2006 Is $command meant to be outside the literal strings on line 41. I think it is. If so there should be no double-quotes in that line. Change them to single ones.Hard to tell which are single and double ones here. The ones you have pasted aren't double-quotes, but are two single ones.If all esle fails, expand all the items to append to the string one line at a time and see where the error is. Seems silly and is a little time-consuming, but this sort of debugging will always help you isolate a problem which has you stumped.Sam Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.