1/20
Contents
List of Figures
List of Tables
Title and Copyright Information
Preface
Audience
Documentation Accessibility
Related Documents
Conventions
1
Introducing PHP with Oracle Database XE
Purpose
Overview of the Sample Application
Resources
2
Getting Started
What You Need
Installing Oracle Database Express Edition
Unlocking the HR User
Unlocking the HR User Using a Command Line
Unlocking the HR User Using SQL Developer:
Database Resident Connection Pooling
Starting the DRCP Pool
Installing Apache HTTP Server
Installing Apache on Windows XP
Installing Apache on Linux
Using the Default HTTPD Package on Oracle Linux
Manually Installing Apache on Linux
Setting the Oracle Environment for Apache on Linux
Setting up a User Directory for the Example Project on Linux
Testing the Apache Installation
Installing PHP
Installing PHP on Windows
Installing PHP on Linux
Installing PHP and OCI8 on Oracle Linux
Adding the OCI8 Extension to an Existing PHP Installation on Linux
Manually Building PHP and OCI8 Together on Linux
Post PHP Installation Tasks on Windows and Linux
Testing the PHP Installation
Checking PHP Configuration with phpinfo()
Testing PHP Connections to Oracle
Installing the NetBeans IDE
Installing NetBeans IDE on Windows
Installing NetBeans IDE on Linux
Configuring NetBeans on Linux and Windows
Using NetBeans
3
Building a Database Access Class
Connection Constants
Creating the Db class
General Example of Running SQL in PHP OCI8
Running SQL with the Db Class
Testing the Db Class
4
Building the AnyCo Application
A Cascading Style Sheet
An Application Class for Sessions
Providing a Stateful Web Experience with PHP Sessions
Adding a Page Class
The Application Login Page
5
Paging Through Employee Data
Creating the Employee Listing
Running the Employee List
6
Showing Equipment Records by Using a REF CURSOR
Introduction to PL/SQL Packages and Package Bodies
Introduction to PL/SQL Stored Procedures
Introduction to REF CURSORs
The Equipment Table
Calling the REF CURSOR in PHP
7
Error handling
Database Errors
Displaying a Custom Error Message
8
Query Performance and Prefetching
Prefetching Overview
The Employee Report Page
Running the Equipment Report
REF CURSOR Prefetching
9
Inserting Data
Building the Insert Form
Running the Single Insert Form
CSRF example with ac_add_one.php
10
Inserting Multiple Data Values
Creating the Multiple Insert Form
Running the Multiple Insert Form
11
Using JSON and generating a JPEG image
Creating a Simple Web Service Returning JSON
Creating a JPEG image
12
Uploading and Displaying BLOBs
Creating a Table to Store the Logo
Uploading Images in PHP OCI8
Fetching the Logo and Creating an Image
Displaying the Logo
13
Monitoring Database Usage of the Application
Overview of Metadata
Viewing Metadata
More Uses of Metadata
Metadata and Persistent Connections
14
Building Global Applications
Establishing the Environment Between Oracle and PHP
Manipulating Strings
Determining the Locale of the User
Developing Locale Awareness
Encoding HTML Pages
Specifying the Page Encoding for HTML Pages
Specifying the Encoding in the HTTP Header
Specifying the Encoding in the HTML Page Header
Specifying the Page Encoding in PHP
Organizing the Content of HTML Pages for Translation
Strings in PHP
Static Files
Data from the Database
Presenting Data Using Conventions Expected by the User
Oracle Date Formats
Oracle Number Formats
Oracle Linguistic Sorts
Oracle Error Messages
Index
Scripting on this page enhances content navigation, but does not change the content in any way.