Over the last few years, PHP has become increasingly popular in the enterprise space, both on account of its friendly licensing terms and its ease of use in building robust, secure applications. It's increasingly being used in conjunction with Oracle Database, the system of choice for large enterprises.
There's only one problem with this happy picture: setting up an Oracle/PHP/Apache/Linux (OPAL) development environment requires some manual steps, which often doesn't fit well in corporate IT environments used to automated simplicity. Online resources such as Oracle's PHP RPMs for Enterprise Linux and reference material such as the Underground PHP and Oracle Manual, Oracle's PHP FAQ Wiki, and various "getting started" guides help for some platforms, but the process still isn't as easy as clicking a bunch of buttons and letting an automated installer do the heavy lifting.
Fortunately, things are changing for the better. And one of the first harbingers of that change is a new release from Zend Technologies: Zend Server, a PHP stack for business-critical applications that runs on both Windows and Linux. It can be used to build Oracle-based applications out of the box. This new product provides a high-performance, enterprise-ready OPAL stack that allows corporate IT departments to add PHP middleware to their existing installations without breaking a sweat. For Oracle users, Zend Server is now recommended over the Zend Core for Oracle product.
This tutorial assumes you know at least a little bit about Linux, Oracle, and PHP. Or at least you know what they are. Or something. Oracle Express is Oracleís free version of their database. It imposes some resources and functionality limitations, but for the purposing of learning and deploying smaller applications, it works fabulously. Itís also the easiest to install. So thatís what Iíll be demonstrating. Iím not going to talk to you about the advantages of Oracle, because I have a feeling that would be a waste of my time and yours.
This talk covers:
* Free Oracle tools
* OCI8 extension
* Connection management (including the new connection pooling feature)
* Improving performance
* Oracle resources
Justin Vogel has been using Ruby with his company's existing PL/SQL packages. One problem he faced was calling a procedure that returned a collection type.
PHP's oci8 extension oci_bind_array_by_name() can bind collections but there is no equivalent in ruby-oci8.
The ability to generate database-driven reports is a "must-have" in most Web-based applications. In order to create a complex report, most developers resort to employing composite data sets--those sets that cannot be retrieved by running just a single SQL query but rather by executing a collection of smaller queries in a loop.
Although this approach is often appropriate, there are alternatives. In this recipe, you will learn alternative techniques that rely on variable binding and Oracle's CURSOR expressions and measure these against the traditional approach. All the code is included, so you should be able to replicate the testing conditions and do some benchmarking of your own.
This book shows how to use the PHP scripting language with the Oracle database. It covers installation of both Oracle and PHP, and shows how to use them together efficiently.
When a connection fails, you want to know about it as soon as possible. With Oracle Net there are many ways to configure connection and authentication.
The common problem with using IIS, PHP and Oracle is incorrect permissions.
Your Windows machine has IIS, PHP and Oracle. You create a PHP script using the oci8 extension and it calls PHP5 functions like oci_connect(), oci_parse(), or PHP4 functions like OCILogon() and OCIParse().
A question was asked in the OTN PHP Forum about how to call Oracle
Text's CTX_THES package from PHP. Oracle Text is described:
Oracle Text uses standard SQL to index, search, and analyze text and documents stored in the Oracle database, in files, and on the web. Oracle Text can perform linguistic analysis on documents, as well as search text using a variety of strategies including keyword searching, context queries, Boolean operations, pattern matching, mixed thematic queries, HTML/XML section searching, and so on. It can render search results in various formats including unformatted text, HTML with term highlighting, and original document format. Oracle Text supports multiple languages and uses advanced relevance-ranking technology to improve search quality. Oracle Text also offers advanced features like classification, clustering, and support for information visualization metaphors.
A step-by-step guide to installing Oracle Database XE and Zend Core for Oracle, as well as using the PHP OCI8 extension