If you have problem while running cake console scripts for your LAMPP installation and get an error like './cake: line 34: exec: php: not found', fix this problem by editing 'cake' shell script and changing line
-
exec php -q ${LIB}cake.php "$@" -working "${APP}"
to
-
exec /opt/lampp/bin/php -q ${LIB}cake.php "$@" -working "${APP}"
This will call the installed 'php' binary from LAMPP installation and you can use the cake console scripts without any problem
Or you could add /opt/lampp/bin/ to your shell path. Not sure on the actual linux command. (I work on a Mac mostly). I explained this in my post about Bake on MAMP
This way if you ever upgrade (however unlikey) you aren't going to kill your modification.
Besides, it allows other scripts to be executed on the command line, such as unit tests or cron jobs etc
Yes, we can also do the same thing your way. On linux, you have to edit your bash_profile file (/home/username/.bash_profile) and add/edit the path there, like I have changed the PATH from
PATH=$PATH:$HOME/bintoPATH=$PATH:$HOME/bin:/opt/lampp/binThanks