Page 1 of 1

php vs php-cli on the command line

Posted: Thu Oct 06, 2016 3:41 pm
by hugo7098
Hello,
On the command line to run PHP the usual command is 'php' but it seems on the IBM i its 'php-cli'. Is this true?

-thanks,
Hugo

Re: php vs php-cli on the command line

Posted: Wed Oct 19, 2016 2:43 pm
by deathcomp
Every time I have needed to call a php script from pase of q2pshell I always use php-cli that is located in /usr/local/zendsvr6/bin

Re: php vs php-cli on the command line

Posted: Tue Jan 10, 2017 3:42 pm
by clarkphp
"php-cli" refers to the shell script at /usr/local/zendsvr6/bin/php-cli, which sets up some environment variables found in usr/local/zendsvr6/etc/zce.rc

Most of the environment variables in zce.rc are related to use of PHP in a web context, not CLI context. You might want the LIBPATH and PASE_USRGRP_LIMITED settings. For CLI scripts, I don't think you'd need the others.