Written by James McDonald

April 21, 2011

My Dreamhost Piwik archive.sh cron job has been failing with an error:

php binary not found. Make sure php5 or php exists in PATH.

I presume this is due to dreamhost changing the PATH env not to include /usr/local/bin so the Piwik archive.sh code is not finding the php binary.

My current answer is to comment out the search for a php binary and add it hard coded as below.

#for TEST_PHP_BIN in php5 php php-cli php-cgi; do
#  if which $TEST_PHP_BIN >/dev/null 2>/dev/null; then
#    PHP_BIN=`which $TEST_PHP_BIN`
#    break
#  fi
# done

# added by james because the above wasn't finding php
# possibly because the PATH env is not right

PHP_BIN=/usr/local/bin/php

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…