44 : php not found [zend cli tool error : solved ]

Everything was working fine until I changed my OS to Ubuntu 10.04 from Debian 5.0. I had my lampp installed in /opt. Although lampp was running, zend cli could not find php. I did exactly what the Getting started Tutorial said.

  • Extract zend framework
  • Edit .bashrc file
  • uncomment following line :

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases

  • if there is already .bash_aliases in your home folder add the following line if not then create and add the following line

alias zf = ‘path/to/zendframework/bin/zf.sh’

But when you try to check zend version “zf show version”, error pops out “44: php not found”.
The missing package is “php-cli” which is use to test php script from terminal/shell. Install “php-cli” from your package manager. After installation restart lampp (if needed). Now open terminal and check zend version, “zf show version”. You should see the version of zend.

  • Did you add /opt/lampp/bin to your environment variable. I guess that would work too 🙂

    • rojan

      adding path variable “/opt/lampp/bin” in environment variable (/etc/environment) does not work.