getting started with community php
December 17, 2019

Getting Started with Community PHP

PHP Development
Back to top

Community PHP Now Available

Community PHP has been released for the IBM i platform! In a recent Zend blog, we covered the release of community PHP for the IBM i platform and provided a comparison of community PHP with the certified PHP stack delivered with Zend Server.

Now that community PHP is available, we want to provide you with information needed to install community PHP on the platform.

Below are the steps to get you started installing PHP. If you’d prefer to have one of our team members from Zend by Perforce connect with you, we’d be happy to help you with the process. You can connect with an expert here.

Back to top

How to Install Community PHP

For those new to the open source way of delivering software, a repository is simply an indexed location where open source packages reside and can be downloaded and installed. The first step needed in installing your PHP is to provide a repository definition for where the PHP packages reside.

Repository Location

For community PHP, the repository location is repos.zend.com/ibmiphp/ and the protocol supported is http. The first patch level of community PHP that has been made available for the platform is 7.3.11. As new patches are released, they will be built for IBM i and added to the repository location.

Repository definition files are located in the /QOpenSys/etc/yum/repos.d directory and while multiple repositories can be defined in a single file typically there is one repository definition file per repository.

Assuming you have the OSS bootstrap installed on your system (download it if you don’t have it, you will need it) a review of the aforementioned directory should reveal a single file named ‘ibm.repo’ which is the definition of the IBM hosted and maintained repository of open source packages.  The community PHP repository is hosted and maintained by Zend and therefore a new repository definition will need to be created. 

The repository definition can either be created by creating the file by hand or the yum-config-manager utility can be used to create the repository definition file. 

The following command will create the repository definition:

yum-config-manager --add-repo http://repos.zend.com/ibmiphp

The repository definition file that gets created from the above command is:

/QOpenSys/etc/yum/repos.d/repos.zend.com_ibmiphp.repo

Its contents are: 

[repos.zend.com_ibmiphp]
name=added from: http://repos.zend.com/ibmiphp
baseurl=http://repos.zend.com/ibmiphp
enabled=1

Once the repository has been defined its availability can be validated with the yum repolist command:

yum repolist

The above command will provide a summary of each repository defined on the system:

repos.zend.com_ibmiphp | 2.9 kB  00:00

repo id         repo name         status

ibm             ibm               470

repos.zend.com_ibmiphp added from: http://repos.zend.com/ibmiphp  29

repolist: 499


A non-zero status indicates the number of packages in the repository.

Coming January 3rd: Further instruction on installation and validation. Stay tuned!

On-Demand Webinar: Getting Started With Community PHP

Watch this one-hour live webinar on open source for IMBi and learn how to:

  • Enable the IBM i platform for open source solutions.
  • Manage open source packages, even when your system is behind a firewall.
  • Take advantage of establishing containers that can be used to isolate development activities.
Back to top

Meet With an Expert

Prefer a consultation one-on-one? The Zend by Perforce team is willing and ready to help you get started with PHP on IBM i and your migration of existing PHP applications to newer versions. Connect with one of our experts!

CONNECT WITH AN EXPERT

Back to top