Oracle 8i | Oracle 9i | Oracle 10g | Oracle 11g | Oracle 12c | Miscellaneous | PL/SQL | SQL | Oracle RAC | Oracle Apps | Linux

Zend Core for Oracle v2

Using Zend Core for Oracle, one installation can provide you with a working PHP installation with full Oracle connectivity and an optional Apache server, with no need for extra configuration needed. It doesn't get simpler than that.

Download the appropriate Zend Core software for your platform, then follow the installation instructions below to perform a default installation on Linux or Windows XP.

Zend Core Installation on Linux

This Zend Core installation was performed on a clean installation of Oracle Enterprise Linux 4.5.

Log in as the root users and open a terminal session. Unzip and extract the Zend Core software, then start the installation.

gunzip ZendCoreForOracle-v2.0.1-Linux-x86.tar.gz
tar -xvf ZendCoreForOracle-v2.0.1-Linux-x86.tar
cd ZendCoreForOracle-v2.0.1-Linux-x86
./install

Click the "OK" button on the welcome screen.

Welcome

Click the "Next" button at the start of the license agreement screen.

License

Accept the license agreement by clicking the "Yes" button.

License Accept

Accept the default location by clicking the "OK" button.

Location

Wait for the Zend Core installation to complete.

Installation

Enter a password for the Zend Core Web GUI, then click the "OK" button.

Zend Core Web GUI Password

Re-enter the password and click the "OK" button on the confirmation screen.

Zend Core Web GUI Password Confirm

Click the "No" button on the support screen.

Support

Click the "Yes" button to install the bundled Apache server.

Apache

Wait for the Apache installation to complete.

Apache Installation

Accept port "80" by clicking the "OK" button.

Port

Read the SSL support note, then click the "OK" button.

SSL

Accept the default installation method by clicking the "OK" button.

Installation Method

Read the Apache installation note, then click the "OK" button.

Note

Accept the "Oracle OCI DB Drivers" option by clicking the "OK" button.

Extra Components

Click the "Next" button on the installation summary screen.

Summary

Click the "OK" button on the installation completion screen.

Completion

Zend Core Installation on Windows

Unzip the "ZendCoreForOracle-v2.0.3-Windows-x86.zip" zip file, double-click the resulting "ZendCoreForOracle-v2.0.3-Windows-x86.exe" executable, then wait for the install shield to start.

Click the "Next" button on the welcome screen.

Welcome

Accept the license agreement, then click the "Next" button.

License

Select the "Complete" setup type, then click the "Next" button.

Setup Type

Accept the default location by clicking the "Next" button.

Location

Select the "Install bundled Apache 2.2.2" option, then click the "Next" button.

Web Server Selection

Accept port "80" by clicking the "Next" button.

Port

Accept the default extension associations by clicking the "Next" button.

Extension Association

Enter an administration password, then click the "Next" button.

Administration Password

Select the "No" support option, then click the "Next" button.

Support

Click the "Install" button on the the read to install screen.

Ready To Install

Wait for the installation to complete.

Installation

Towards the end of the installation the "Update Your System" wizard is initiated.

Update Your System

Click the "OK" button on the message dialog.

Message

Click the "Finish" button on the installation complete screen.

Complete

Test It

Copy the example PHP code from the Web Scripting for Oracle article and save it into a file called "test.php" in one of the following locations.

You will need to adjust the database connection details on line 10. When using the Zend Core, you have three ways to identify the database you wish to connect to, all of which are shown below.

// Connect to the SCOTT schema of the DB10G database.
// EZConnect.
$conn=OCILogon("scott", "tiger", "//myserver.mydomain:1521/DB10G.WORLD");

// Full service description.
$conn=OCILogon("scott", "tiger", "(DESCRIPTION =
                                    (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.mydomain)(PORT = 1521))
                                    (CONNECT_DATA =
                                      (SERVER = DEDICATED)
                                      (SERVICE_NAME = DB10G.WORLD)
                                    )
                                  )");

// tnsnames.ora
putenv("TNS_ADMIN=/usr/local/Zend/Core/network/admin");                      //Linux
//putenv("TNS_ADMIN=C:\Program Files\Zend\Core For Oracle\network\admin");   // Windows
$conn=OCILogon("scott", "tiger", "DB10G");

The first method uses the EZConnect URL to identify the database. The second method, uses a full description, as you would expect to see in the tnsnames.ora file. The third method uses a database alias, which is translated using a tnsnames.ora file. For the third method to work correctly, you must create a tnsnames.ora file in the location specified by the "putenv" function. To match the example code on Linux we must create the directory.

mkdir -p /usr/local/Zend/Core/network/admin/

Then create a "tnsnames.ora" with the following contents.

DB10G =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.mydomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = DB10G.WORLD)
    )
  )

The third connection method should work correctly now also.

Run the test script by requesting the following style URL from a browser.

http://myserver.mydomain/test.php

The expect output is displayed in the Web Scripting For Oracle article.

During the installation you were prompted for an administrator password. The following URL points you to the administration login page.

http://myserver.mydomain/ZendCore

Enter the password you specified during the installation, the click the triple-arrow image.

Zend Core Administration Login

You are then presented with the Zend Core Administration page.

Zend Core Administration

For more information see:

Hope this helps. Regards Tim...

Back to the Top.