PHP build for Jenkins failing with 'Cannot run program "phploc"' PHP build for Jenkins failing with 'Cannot run program "phploc"' jenkins jenkins

PHP build for Jenkins failing with 'Cannot run program "phploc"'


I finally figured this out... checking the $PATH variable is not helpful in this context. The various shell startup files are not executed when running a Jenkins job, so the $PATH variable was not being properly populated. This can be remedied by following the three steps below:

  1. Click Manage Jenkins
  2. Click Configure System
  3. Add new environment variable where name is PATH and value is $PATH:/usr/local/zend/bin.