Wednesday Jan 11, 2012
Monday Oct 24, 2011
By cj on Oct 24, 2011
The Oracle Instant Client 184.108.40.206 for Linux is now available on OTN. I know many users will upgrade sooner rather than later to get the "latest and greatest" release.
However, if your PHP application uses oci_password_change (or its old alias ocipasswordchange), you should upgrade the client libraries (Instant or normal "full" client) and the Oracle Database version to 220.127.116.11 at the same time. Otherwise oci_password_change will fail with the error "ORA-1017: invalid username/password". If you're not using oci_password_change then this won't impact you.
Since the protocol change is in the Oracle libraries, the change is not just limited PHP. Any C program using Oracle's Call Interface "OCIPasswordChange" API to change passwords will also have the same restrictions.
Monday Sep 26, 2011
Wednesday Jun 15, 2011
By cj on Jun 15, 2011
Here are some key resources for working with PHP and Oracle technologies.
- Overall Links
Oracle : Oracle Technology Network (OTN)
Homepage : The PHP Developer Center -- downloads, how-tos, sample code and discussion forums brought to you by OTN.
Read : PHP Articles -- a collection of informative articles on OTN.
PHP Oracle Database Extension : OCI8 is the most available and scalable PHP adapter for the Oracle database. It is included with PHP, and is also separately downloadable for upgrading older PHP releases. OCI8 works with PHP 4 and PHP 5, and will compile with Oracle 9iR2, 10g and 11g client libraries. Oracle's standard cross-version compatibility and connectivity is applicable, so OCI8 can connect to older or newer databases, locally or remotely. The latest OCI8 release includes support for Oracle Database 11g Database Resident Connection Pooling (DRCP), and for Fast Application Notification (FAN) [whitepaper here], and also has support for Oracle's authentication and end-to-end tracing meta data attributes [article here]. These features improve scalability and availabilty of the OCI8 extension.
The OCI8 extension can also be used with the Oracle In-Memory Database Cache.
Book : The Underground PHP & Oracle Manual -- the definitive, free guide to using PHP with Oracle Database.
Read : PHP & High Scalability -- covers enabling DRCP and FAN for PHP applications.
Read : PHP Web Auditing, Authorization and Monitoring with Oracle Database -- learn how to audit individual web users, automatically apply rules to individual web users to restrict data access, and monitor and trace database usage per application user.
Forum : The Oracle & PHP forum -- technical discussion forum for using PHP with Oracle.
Blog : PHP and Oracle: Christopher Jones -- The latest news on PHP and Oracle.
Database : Oracle Express Edition Database -- an entry-level, small-footprint database based on the standard Oracle Database code base that's free to develop, deploy, and distribute; fast to download; and simple to administer.
PHP OCI8 works with Oracle Database XE the same way it works with the other editions of Oracle Database.
Oracle Database XE is a great starter database for:
- Developers working on PHP, Python, Ruby, Java, .Net and other open source applications.
- DBAs who need a free, starter database for training and deployment
- Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
- Educational institutions and students who need a free database for their curriculum
Database : MySQL -- The world's most popular open source database. MySQL Community Edition is the freely downloadable version. Commercial customers have the flexibility of choosing from multiple editions to meet specific business and technical requirements. Also available for free is the MySQL Workbench for SQL Authoring, System Administration, and schema modeling.
Recent additions to MySQL include semi synchronous replication, direct memcached-to-InnoDB access, multi-threaded replication, and enhanced partitioning. See What's new in MySQL 5.6
PHP's mysqli or PDO_mysql extensions can be used to access MySQL.
Homepage : Using MySQL With PHP -- Articles and downloads
Forum : PHP and MySQL forum -- The place to ask questions
Blog : Planet MySQL -- The latest MySQL news from the community
Blog : Johannes Schlüter -- A member of the MySQL connector team and the current PHP Release Master.
Blog : Me Talking Out Loud -- Ligaya Turmelle, a member of MySQL Support. (and contributer to The PHP Anthology: 101 Essential Tips, Tricks & Hacks)
Blog : Internet Super Hero -- Ulf Wendel, a member of the MySQL connector team.
Database : Oracle Berkeley DB 11g -- provides the complex data management features found in enterprise class databases. These facilities include high throughput, low-latency reads, non-blocking writes, high concurrency, data scalability, in-memory caching, ACID transactions, automatic and catastrophic recovery when the application, system or hardware fails, high availability and replication in an application configurable package. Simply configure the library and use the particular features available to satisfy your particular application needs. Berkeley DB can be configured to address any application need from the hand-held device to the datacenter, from a local storage solution to a world-wide distributed one, from kilobytes to petabytes.
Berkeley DB's SQL API allows PHP's sqlite3 and PDO_sqlite extensions to be used.
Berkeley DB also includes source code for a php_db4 extension.
IDE : NetBeans -- lets you develop desktop, mobile and web applications using Java, PHP, C/C++ and more. Runs on Windows, Linux, Mac OS X and Solaris. NetBeans IDE is open-source and free.
Understand: NetBeans PHP features -- All the great features that NetBeans has for PHP developers
Learn: NetBeans PHP Learning Trail -- the best way to learn how to use NetBeans
Virtualize : Oracle VM VirtualBox -- powerful Cross-platform Virtualization Software for x86-based systems. "Cross-platform" means that it installs on Windows, Linux, Mac OS X and Solaris x86 computers. And "Virtualization Software" means that you can create and run multiple Virtual Machines, running different operating systems, on the same computer at the same time. For example, you can run Windows and Linux on your Mac, run Linux and Solaris on your Windows PC, or run Windows on your Linux systems.
Oracle VM VirtualBox is available as Open Source or pre-built Binaries for Windows, Linux, Mac OS X and Solaris.
OTN hosts some pre-built Developer VMs , including an Oracle Tuxedo Web Application Server VM showing PHP support. There is also a Zend Server VM for PHP created by Zend. Zend Server is a complete, Oracle-enabled, enterprise-ready Web Application Server for running and managing PHP applications that require a high level of reliability, performance and security. Zend Server is available in community and supported editions.
Operating system : Oracle Linux -- free to download and distribute. As one of the most widely deployed operating systems today, Linux is increasingly being adopted for cloud-based solutions. Oracle Linux is the most complete and integrated solution available and delivers higher performance and better reliability at up to 7 times lower cost than Red Hat. Why Choose Oracle Linux over Red Hat Linux?
Oracle Linux 5.6 and 6 introduced PHP 5.3 packages. Subscribers to the Unbreakable Linux Network have access to an additional pre-built PHP OCI8 RPM, and also direct access to an RPM for installing Zend Server .
Users of older Linux 5 releases can get PHP 5.3 RPMs from oss.oracle.com .
Application Server : Oracle Tuxedo -- provides a robust, grid enabled platform for developing enterprise applications. It provides mainframe-class scale and performance on open, distributed systems for software written in C, C++, COBOL, PHP, Python and Ruby. Oracle Tuxedo provides cost-effective reliability, extreme scalability and throughput of hundreds of thousands of transactions per second. Functionality like Web services, SCA programming model, metadata driven application development make it simple to develop and integrate applications written in many programming languages.
PHP applications can be hosted on the Tuxedo platform without requiring any code changes and can leverage high availability, scalability and integration capabilities.
The whitepaper Oracle Tuxedo - An Enterprise Platform for Dynamic Languages explains the architecture and features. A Tuxedo Demo VM for VirtualBox is available for immediate testing.
Client Libraries : Oracle Instant Client -- a small footprint set of libraries that allows applications and tools to connect to an existing Oracle Database. Oracle OCI, OCCI, Pro*C, ODBC, and JDBC applications work without modification.
The PHP OCI8 extension can be built with Oracle Instant Client to connect to a remote database.
Instant Client is provided under a separate OTN Development and Distribution License for Instant Client that allows most licensees to download, redistribute, and deploy in production environments, without charge.
Tuesday May 24, 2011
By cj on May 24, 2011
In a nicer section of the RAI conference center than in previous years I've attended, the Dutch PHP conference last week was as professionally organized as ever by ibuildings. The weather was kind too, having cleared up from a previous blustery days I'd spent south of Amsterdam with my parents.
My talk had a big audience, which stayed the course. Unfortunately my abstract was condensed down in the small printed name-tag/program-guide, which contributed to some polarized reviews. Some really liked the Oracle-PHP overview section, while others were not expecting it.
In a few minutes I'm heading off to Chicago for php|tek. My talk is based on the presentation I gave at DPC but I'll cut down the "state of the Oracle-PHP nation" section down by a couple of slides (taking it to about 8 minutes worth). I'll also rejig which advanced Oracle techniques are covered in the main part of the talk. My code snippets and screen captures didn't satisfy DPC audience's thirst for knowledge so I'm adding back (some) live demos - hey, why not live dangerously!?
Since I'm at the conference for the full three session days, there'll be plenty of time for you to pin me down with your questions. And if you have MySQL questions, Ligaya Turmelle is the person to talk to. Her tutorial is in session as I write. She's also talking about schema normalization on Wednesday afternoon.
At php|tek make sure you come along to the Uncon after hours on Wednesday and find all the latest and hot topics. Oracle is sponsoring it this year.
Saturday May 14, 2011
Thursday May 12, 2011
By cj on May 12, 2011
The Oracle Tuxedo team have posted an Oracle Tuxedo 18.104.22.168 Web Application Server Demo for PHP. It is a VirtualBox VM so you can immediately test it out. The free VM is available from OTN's Pre-Built Developer VMs page.
Oracle Tuxedo provides a scalable and highly available mid tier platform capable of managing and integrating heterogeneous applications. This overview datasheet explains its capabilities: "Oracle Tuxedo provides a service-oriented infrastructure for efficiently routing, dispatching, and managing requests, events, and application queues across system processes and application services". A raft of other material is on the Tuxedo landing page. There is also a new white paper on PHP being reviewed at this very moment.
The VM uses Oracle Linux 5.6. It has PHP 5.3 and Oracle Tuxedo 22.214.171.124 installed and configured. The SALT and TSAM components of Tuxedo are also available.
Tuxedo's PHP support comes in the form of a new mod_tuxedo module for Apache 2.2 (or Oracle HTTP Server). This handles all PHP scripts, executing them using managed PHP processes. Existing applications can run normally:
Tuxedo also lets PHP be exposed as a web service:
The tutorial manual provided inside the VM steps through using PHP in both ways. The NetBeans IDE, Oracle Database XE and MySQL are included on the VM to make it easier to carry out your own further experiments with Tuxedo and PHP.
Tuxedo has been around for a long time and has an established customer base. If you look at Oracle Database's big TPC-C benchmark's you can see Tuxedo was involved. It's even certified on Exalogic. The new dynamic language support in Tuxedo is going to open up "Enterprise" infrastructure, making it easy to integrate modern solutions in a heterogeneous environment.
When I get back from the Dutch PHP and PHP|Tek conferences, which run back to back from next week, I plan to write up more details about using Tuxedo and PHP.
Update: a new whitepaper is available: Oracle Tuxedo: An Enterprise Platform for Dynamic Languages.
Wednesday May 11, 2011
By cj on May 11, 2011
Discussion on the PHP mail lists and IRC channels in the past few days has been looking positive about an alpha release of PHP 5.4 soon. This will be taken from the "trunk" branch of PHP. The exact feature list is under discussion but the mood seems to be "ship what we currently have" though a couple of features are slated to be deferred until later.
A paragraph from a post by Rasmus Lerdorf on PHP's "internals" mail list is worth re-broadcasting. Rasmus is more than willing to grant PHP karma to encourage contributions:
And if you can't figure out how to fix a test, post the details here. I'd love to point some of the obvious talents and energy of this list towards the code. If you don't have an svn account for committing your fixed test, go to http://www.php.net/svn-php.php and fill in the little form at the bottom there and put in the test that you fixed and a 1-liner about how you fixed it and I will set you up with an account right away. Info on how to check out the code from svn is here: https://wiki.php.net/vcs/svnfaq
So, you can easily become a contributor to PHP, which would look great on your resume.
To discuss test issues you can subscribe to the PHP internals and QA mail lists at http://php.net/mailing-lists.php
By cj on May 11, 2011
This is a post for the "so I can find it again" category. (It is also a test for the new blogging infrastructure that Oracle migrated to last week).
After an upgrade to Ubuntu 11.04 on one 32 bit machine, my simple custom script to build PHP 5.3 from source failed. The script isn't complex, pulling in a couple of extensions that I use for sanity checking the OCI8 extension. I use the GD extension to generate some simple graphs.
My configuration command was like:
./configure ... --with-gd --with-jpeg-dir --with-png-dir ...
which gave the error:
configure: error: libjpeg.(a|so) not found
This release of Ubuntu has moved around some standard libraries. After some fiddling around, checking the 'configure' options and the GD extension config.m4 file intention, the solution for me was simple. Add the
--with-libdir=lib/i386-linux-gnu option to configure. I haven't tried this with other extensions so YMMV.
Update: Rasmus just merged a patch to gd that should make the
--with-libdir option unnecessary
Wednesday Apr 27, 2011
Wednesday Mar 23, 2011
Wednesday Mar 16, 2011
Thursday Mar 03, 2011
Tuesday Mar 01, 2011
I work in the Linux Engineering team at Oracle, espousing the Oracle-PHP-Apache-Linux ("OPAL") stack. I also assist with Python, Perl and Ruby.
Book: Free PHP Oracle book
Download: PHP Linux RPMs with the OCI8 extension
Links: OTN PHP Developer Center
- The Oracle Database Access Group is hiring
- Support for binding Oracle PL/SQL BOOLEAN introduced in PHP OCI8 2.0.7
- Tracing PHP with DTrace - Five Minute Lightning Talk is on Youtube
- DTrace and Perl from @GregoryGuillou
- PHP Examples in New "Oracle Linux 6 DTrace Tutorial"
- Tracing Silex from PHP to the OS with DTrace
- DTracing a PHPUnit Test: Looking at Functional Programming
- PHP PECL OCI8 2.0 Production Release Announcement
- DTrace PHP Using Oracle Linux 'playground' Pre-Built Packages
- Come and Join us in San Francisco this Week