php vs php-cli on the command line

General discussion on Zend Server for IBM System i

php vs php-cli on the command line

Postby hugo7098 on Thu Oct 06, 2016 3:41 pm

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
hugo7098
 
Posts: 3
Joined: Fri Apr 19, 2013 1:45 pm

Re: php vs php-cli on the command line

Postby deathcomp on Wed Oct 19, 2016 2:43 pm

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
deathcomp
 
Posts: 34
Joined: Mon Feb 13, 2012 5:17 pm

Re: php vs php-cli on the command line

Postby clarkphp on Tue Jan 10, 2017 3:42 pm

"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.
User avatar
clarkphp
Zend Global Services
 
Posts: 32
Joined: Sat Jun 30, 2012 9:59 pm
Location: Tennessee, United States


Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 2 guests

cron