PHP build for Jenkins with the error: "Cannot start the phploc program",

I get the following error when trying to run my build script.

/var/lib/jenkins/jobs/IPS (trunk)/workspace/build.xml:62: Execute failed: java.io.IOException: Cannot run program "phploc": java.io.IOException: error=2, No such file or directory 

I tried switching to the jenkins user and was able to run the script without a hitch. I also checked $PATH and tried to reinstall. Bad luck!

  • CentOS 5/6
  • PHP 5.4 (Zend Server)
  • Jenkins 1.477
  • PHP QA Components (Latest)
+6
source share
1 answer

I finally figured this out ... checking the $PATH variable is not useful in this context. Various shell startup files are not executed when a Jenkins job is executed, so the $PATH variable was not properly populated. This can be fixed by following these steps:

  • Click "Manage Jenkins"
  • Click Configure System
  • Add a new environment variable, where name is PATH and the value is $PATH:/usr/local/zend/bin .
+10
source

Source: https://habr.com/ru/post/923413/


All Articles