zmly521
(tester)
1
I want to use sonar-scanner in php program,but they are not in same server,when execute php program,I find that sonar-scanner command does not work.
I also use ssh xxx@xxx ‘sonar-scanner’ to remote call sonar-scanner,but it tells me that command not found.
but I run ‘sonar-scanner’ locally, it worked.
I want to know how can I remote call sonar-scanner?
agabrys
(Adam Gabryś)
2
Did you try to execyte ssh xxx@xxx /full/path/to/sonar-scanner
? I think the problem can be caused by path
configuration of your ssh xxx user.
zmly521
(tester)
3
I have used full path but it tells me that /full/path/sonar-scanner is a directory
after that,I install sonar-scanner and php program on the same server,in php api,I used ‘system(“sonar-scanner -v”)’,it also dose not work.
whether sonar-scanner cannot be used in http api
agabrys
(Adam Gabryś)
4
I’m not sure, but maybe you point to sonar-scanner
directory, not the script Example /opt/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner
.
Try to login as php user and execute sonar-scanner -v
. Maybe the scanner is not included in the path
variable for this user.
zmly521
(tester)
5
thank you very much!
It has resolved my question by using /opt/sonar-scanner-3.2.0.1227-linux/bin/sonar-scanner, it dose work.
agabrys
(Adam Gabryś)
6
Great. Please mark my previous post as solution
.
Cheers