The easiest way to install ZF3 on IBM i is to use a Composer. This can be done from a command line in PASE.
Command ===> CALL QP2TERM
Once in PASE first let add some path to our session to make PHP visible to us:
$ PATH=$PATH:/usr/local/zendphp7/bin
$ LIBPATH=$LIBPATH:/usr/local/zendphp7/bin
$ export PATH
$ export LIBPATH
or you can make the changes permanent:
$ echo "export PATH=/usr/local/zendphp7/bin/:$PATH" >> ~/.profile
$ echo "export LIBPATH=/usr/local/zendphp7/bin/:$LIBPATH" >> ~/.profile
If you don’t have Composer installed you can do it now:
$ php -r "readfile('http://getcomposer.org/installer');" > composer-setup.php
$ php composer-setup.php
Now we can copy Composer to PHP library
$ mv composer.phar /usr/local/zendphp7/bin
and to clean after the install:
$ rm composer-setup.php
This installation can be ran also using PHP script; there is a nice example on GitHub from Ben Kuhl.
With Composer’s on-board we can signal the framework and the skeleton app:
$ composer.phar create-project -n -sdev zendframework/skeleton-application path/to/install
That’s it! Now you can navigate your browser to your installation directory and the Zend Framework home page should appear on your screen.
References:
MVC Skeleton Application Installation using Composer
Troubleshooting:
Increase memory in PASE:
$ export LDR_CNTRL=MAXDATA=0xB0000000@DSA
Leave a Reply