PHP PECL OCI8 1.3.2 Beta Available
By cj on Apr 17, 2008
I've released PECL OCI8 1.3.2 Beta - the latest release of PHP's OCI8 extension with support for Connection Pooling and Fast Application Notification. The release is based on the current PHP 5.3 development branch.
The development team has been hard at work refactoring, tuning, stress testing, and benchmarking the code. The code has come a long way since our first release of 1.3 last year. I feel that 1.3.2 should be the last Beta.
One change since 1.3.1 that I should mention, is that oci_pconnect() persistent connections will now do a "session release" (an OCI8-implementation internal operation) if the end of scope is reached (for example at the end of a function) and there are no PHP variables referencing the connection resource. The implication is that a rollback will happen - silently. It brings persistent connection behavior in line with normal connections. This makes the API more predictable. It allows applications to change between non-persistent and persistent connections more easily. It makes the implementation of OCI8 cleaner, and allows greater resource efficiency.
We evaluated the impact with the co-operation of our Beta testers. The change doesn't affect PHP OCI8 scripts that do one or more of:
- Pass a oci_pconnect() connection resource between functions
- Explicitly commit or roll back transactions
- Use oci_connect() or oci_new_connect()
Code that doesn't do any of them, and instead relies on transactions in persistent connections being open beyond the end of scope, might already be subject to seemingly random or "delicate" behavior. PHP's internal use of ref-counting sometimes makes it hard to predict when resources actually get released. For the very few people affected by the OCI8 persistent connection change, the behavior will be clearer and more consistent, and there is an incentive to code in a more logical style.
But to ease any lingering upgrading issues, setting oci8.old_oci_close_semantics=1 will cause connection closes to be no-ops, just like the old days.