Using this article from Johannes Schluter as a starting point Vinu Thomas has worked up his own example of how the technique is used in the example on the Launchpad page.
This article is interesting because of the uses which come up when you can create custom Storage Engines using PHP. An interesting usecase for this is in creating test cases, where you can feed the data for a query from PHP and trap the activities on the database.
The example code defines methods for update, write and delete and the SQL to create the table and insert/manipulate rows is included (for a table created with "ENGINE=PHP").
In this new post to his blog Johannes Schluter looks at creating a storage engine plugin for MySQL via its plugin interface.
MySQL 5.1 has a plugin interface to easily add storage engines. PHP can easily embedded into other applications. So why not combine these two things? - Writing a MySQL Storage Engine which reads data by calling a PHP script.
He starts with a basic example with create_table and open_table functions that can pull the data from the table marked with the "Engine" setting of PHP. He expands on this to allow for more functionality - update, delete and write methods are added.
A "php-oci8-11gR1" RPM is now available on the "Unbreakable Linux Network" (http://linux.oracle.com/) in the Oracle channel. If you have the appropriate ULN subscription, you can use 'up2date' or 'yum' to install it and its dependencies (e.g. the Oracle Instant Client 11g RPM).
This new package includes drivers for 9iR2, 10g and 11g Oracle databases and uses connection pooling if it is available.
Chris Jones has announced the release of the latest version of the Undergroupnd PHP & Oracle Manual.
A hot-off-the-press, free, 290 page, updated version of the Underground PHP & Oracle Manual is available for download from http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf. [...] The previous edition was released way back in May 2007. Since then, Oracle Database 11g and the OCI8 1.3 extension have been released, there have been various changes in PHP community, and I've simply just gathered more notes, examples and have more information to share.
The manual has doubled in size and includes tons of new content reflecting the updates since the previous release. Chris thanks those who helped in creating the content, helped get it out to the community and his co-author Alison Holloway.
The PHP Group has officially released the next version in the PHP 5.2.x series (as an update to the flaw in PHP 5.2.7) - version 5.2.8:
The PHP development team would like to announce the immediate availability of PHP 5.2.8. This release addresses a regression introduced by 5.2.7 in regard to the magic_quotes functionality, that was broken by an incorrect fix to the filter extension. All users who have upgraded to 5.2.7 are encouraged to upgrade to this release, alternatively you can apply a work-around for the bug by changing "filter.default_flags=0" in php.ini.
You can download this latest release from the downloads page on the main php.net website or from your favorite local mirror.
NOTE: This release has been recalled due to a security bug found involving magic_quotes_gpc.
The latest version in the PHP 5.2.x series has been released today - PHP 5.2.7:
The PHP development team would like to announce the immediate availability of PHP 5.2.7. This release focuses on improving the stability ofthe PHP 5.2.x branch with over 120 bug fixes, several of which are security related. All users of PHP are encouraged to upgrade to this release.
These security updates include an update of the PCRE version, fixing an incorrect order with php_value, correcting a possible overflow in memnstr and more. Check out the full Changelog for more information on these updates and improvements. You can download this latest update from the PHP.net website (or your favorite mirror).
Stefan Koopmanschap has a new post to the Ibuildings blog today about symfony's 1.2 release.
The first day of december started well: It meant the release of the new symfony 1.2.0 version. Aside from the additions and improvements in the code, this new branch of symfony also reinstates an old tradition in symfony: It comes paired with a huge amount of documentation in many forms. Let's have a look at what symfony 1.2 has to offer.
He mentions multiple updates and changes to the framework as well as three specific improvements in the realm of documentation - the jobeet advent calendar, a symfony + doctrine book and the constant stream of tutorials coming out of the community.
This new tutorial on the PHPro.org website shows how to implement a common database feature, ON DUPLICATE KEY UPDATE, in a SQLite database with PHP.
SQLite is an ultra lite database replacement that comes bundled with PHP. Because of its light weight it lacks many of the features found in more robust applications such as MySQL, PostgresQL and others. One of the features that is lacking is the ON DUPLICATE KEY UPDATE that is often used to automatically UPDATE a record, should a duplicate field be found. Here a demonstration is provided to duplicate this behaviour using PHP Exceptions.
Their example creates a table of animals and inserts several to act as a base. They show insert method, how to get the information back out and what happens when you try add a duplicate value to the table. Normally this just results in an exception being displayed but, when caught with exception handling, it can be redirected into an update statement to change that animal's current information.
Andi Gutmans has posted an update on the status of the Zend_Amf component of the Zend Framework to his blog today, including links to some examples and updates from other developers.
Some of the resources he links to include several examples written up by Kevin Hoyt showing how to get started with the component, the webinar from Matthew Weier o'Phinney and Lee Brimlow as well as a manual page for it over on RIAFox.com.
Chris Jones has written up another post about a feature in some of the latest OCI8 libraries for PHP - result caching.
Oracle Database 11g introduced "server-side"and "client-side" result caches. The database cache is enabled with the RESULT_CACHE_MODE database parameter, which has several modes. With the default mode, queries for which you want results to be cached need a hint added - No PHP changes are required.
This caching is perfect for results from smaller lookup tables and can drop CPU usage by quite a bit. Oracle automatically takes care of validating the cache entries when something changes the stored results so your query is always fetching the latest (without having to worry about a timestamp on the cache or anything like that). He gives a few examples of how it would work, comparing the queries both with and without the caching.