sidebar
When trying to access an Oracle table in PHP running on Zend Server for IBM i, the PHP program fails with following error: undefined function OCILogon()
Starting with Zend Server 2021.1.0 the Oracle oci8 Extension can be added using yum install. This extension is not available in Zend Server 2020.x and Zend Server 2021.0, as there was no available 64-bit version from Oracle at that time.
The Open Source Environment for IBM i must be configured prior to running this command
https://ibmicommunity.thebeardedgeek.com/2020/07/setting-up-the-open-source-environment-on-ibm-i/
Make sure you are logged in with a *SECOFR class user profile. Your user profile should have a home directory containing a .profile file, and that .profile file should set your path so the yum command can be found.
If you are not sure your user profile is properly set up, please review Preparing for Installation
To begin the update, go into the PASE terminal. From the 5250 command line:
In the PASE terminal, enter this command.
The system will resolve dependencies and calculate the download size. Key 'y' to continue the install.
Messages similar to the ones below will appear as the installation proceeds. While the update is running, do not enter additional commands or exit the screen. Allow the process to run until a dollar sign (or hashtag for QSECOFR) appears. This indicates the process has completed.
The zsd daemon needs to be restarted after the extension has been added.
This command submits a job to the jobqueue on the IBM i.
Once the submitted job has completed, log into the Zend Server User Interface, typically at port 10101 for Zend Server 2021.1.x
Navigate to the PHP tab and click on Extensions. The oci8 extension will be 'off' by default. Select the extension by clicking the check box and then click the 'Enable' button at the top left of the window.
Before the extension can be 'loaded' and functional, a Restart of Zend Server is required. There should be an orange circular arrow in the upper right of the window indicating the need for a Restart.
Please note that the Restart will require that your website / applications will be down for a few minutes while the changes are applied and the server jobs restarted.
After pressing the orange arrow for the Restart the following Confirmation screen will appear. Press Yes if you are ready to Restart Zend Server. If you decide not to restart at this time, press No to Cancel the request.
When the Restart has completed, the Extension will be 'Loaded'. Clicking it once displays the details of the messages and use of the extension.