PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 31 Mar 2015 17:06:31 -050030http://www.phpdeveloper.org/news/21601http://www.phpdeveloper.org/news/21601
As Chris Jones mentions in his latest post to his OTN blog, there's a tutorial that's been posted by David Felcey showing how to get started with Oracle Coherence via the memcached adapter in PHP. Coherence is Oracle's own version of a key/value storage that focuses on performance and scalability.

Coherence 12c (12.1.3) adds support for Memcached clients to directly store data a in Coherence cluster using the Binary Memcached protocol. This post outlines how to configure the Coherence Memcached Adaptor and includes a simple PHP example to show how Memecached clients can connect to a Coherence cluster.

He includes the XML configuration you'll need to create/modify on the Oracle side to make the memcached connections work and explains the different parts. With that in place, he moves on to the PHP example, showing a simple memcached request to store and retrieve a string. It's almost transparent to the PHP user save some of the configuration options required to make it work.

Link: https://blogs.oracle.com/OracleCoherence/entry/getting_started_with_the_coherence]]>Wed, 20 Aug 2014 10:55:45 -0500http://www.phpdeveloper.org/news/21090http://www.phpdeveloper.org/news/21090
On the Oracle Technology Network site today they've posted an updated version of their guide to getting PHP installed on Oracle HTTP Server 12c, complete with all the commands you'll need to get the job done.

This article shows how to install PHP on Oracle HTTP Server 12c (OHS). PHP is a hugely popular, interpreted scripting language commonly used for web applications. OHS is the web server component for Oracle Fusion Middleware. It is based on the Apache HTTP Server. OHS includes a FastCGI module which can easily be configured to use PHP's bundled FastCGI Process Manager ("PHP-FPM"). PHP-FPM has become a standard way of installing PHP. I

The remainder of the post is broken down into the steps you'll need to get it all installed and working:

Install Oracle Linux

Install Oracle HTTP Server

Install Oracle Instant Client 12c

Install PHP

Configure PHP-FPM

Configure OHS

Start PHP-FPM & OHS

A simple test script (a phpinfo) is also included to help you ensure everything is running as it should be.

Link: http://www.oracle.com/technetwork/articles/dsl/jones-php-ohs-2194096.html]]>Fri, 25 Apr 2014 09:41:26 -0500http://www.phpdeveloper.org/news/20354http://www.phpdeveloper.org/news/20354
Continuing on with his look at using DTrace in with PHP, Chris Jones has a new post in the series showing how to add traces to Silex-based applications, including sample output.

In this blog post I show the full stack tracing of Brendan Gregg's php_syscolors.d script in the DTrace Toolkit. The Toolkit contains a dozen very useful PHP DTrace scripts and many more scripts for other languages and the OS. For this example, I'll trace the PHP micro framework Silex, which was the topic of the second of two talks by Dustin Whittle at a recent SF PHP Meetup. His slides are at Silex: From Micro to Full Stack.

He includes a brief guide to getting the DTrace support up and running based on instructions in a previous post based on some pre-build Oracle linux packages. He links to the latest DTrace Toolkit and the downloads page to get the latest version of Silex. He sets up a super-basic Silex application (one route, "hello") and shows how to run the DTrace against it. His sample output shows both the PHP files being called and the functions/methods called inside them resulting in an output over a thousand lines long.

Link: https://blogs.oracle.com/opal/entry/tracing_silex_from_php_to]]>Wed, 06 Nov 2013 12:31:23 -0600http://www.phpdeveloper.org/news/20199http://www.phpdeveloper.org/news/20199
Related to some of his otherposts about using DTrace with PHP, Chris Jones has a new post about using pre-built packages to make using it even easier.

We've released DTrace-enabled PHP 5.5.4 RPMs to make testing DTrace on Oracle Linux easier. As a result, the manual PHP install steps listed in Using PHP DTrace on Oracle Linux can be skipped. There are updated Betas of the "UEK3" Linux Kernel 3.8.13-16 and the dtrace-utils tools available too. With these, you now can DTrace PHP applications under Apache or with php-fpm, as well as command line PHP scripts.

He includes the full instructions on how to install the Oracle Linux distribution and grab the Oracle Instant Client libraries used for the "playground" packages. Next up is the PHP install - a quick call to yum - and a simple script showing how to set DTrace probe. Some sample output of the trace is shown and an slight modification to the probe showing how to find only calls from a certain source.

Link: https://blogs.oracle.com/opal/entry/dtrace_php_using_oracle_linux]]>Thu, 03 Oct 2013 09:12:07 -0500http://www.phpdeveloper.org/news/20076http://www.phpdeveloper.org/news/20076
Chris Jones has posted an update to his previous article about DTrace and PHP (found here) and some of the updates Oracle has made to introduce things like "user-level statistically defined tracing" (USDT).

At the end of last year, I blogged about Adding DTrace Probes to PHP Extensions and how Linux's SystemTap could be used to trace the DTrace probe points. Since then, Oracle's Linux's DTrace project has been making great strides. The latest Oracle Linux UEK3 Beta kernel was just released. It comes with DTrace 0.4 and also supports "User-Level Statically Defined Tracing" (USDT) for the first time. This motivated me to make sure PHP DTrace worked well with "real" DTrace, not just with SystemTap's wrappers.

He also includes a list of the other updates in this version like:

DTrace build script changes from PHP 5.5 were merged back to PHP 5.4

A 'make install' recursive dependency issue that caused Zend/zend_dtrace.d to be deleted was fixed.

PHP DTrace configuration now uses the correct PIC or non-PIC objects. This also fixed building PHP when any extensions were built 'shared'.

PHP's OCI8 2.0 extension now builds correctly with "real" DTrace.

He finishes off the post with the list of steps you'll need to follow to get this latest version up and running.

Link: https://blogs.oracle.com/opal/entry/dtrace_with_php_update]]>Thu, 05 Sep 2013 09:06:16 -0500http://www.phpdeveloper.org/news/19904http://www.phpdeveloper.org/news/19904
Chris Jones has a new post to his site showing you how to use Oracle 12c's implicit result sets in your code. Note: this functionality is still in development, so the naming/exact functionality might change.

The new Oracle Database 12c "Implicit Result Sets" (IRS) feature allows query results to be returned from a stored PL/SQL procedure (or a PL/SQL anonymous block) without requiring special PHP code. Support for IRS is available in PHP OCI8 2.0.0-devel extension when it is compiled and used with Oracle Database 12c. (OCI8 2.0 can be compiled and used with other versions of Oracle Database but the available feature set is reduced).

He shows a normal fetch loop that calls the oci_* functions and grabs each row with a oci_fetch_row call. He updates this to use an anonymous PL/SQL block (a string) instead that allows for more flexibility. He includes examples that fetch from one table, multiple tables and returns multiple result sets (that can be fetched one at a time) from the same single call.

Link: https://blogs.oracle.com/opal/entry/using_php_oci8_2_0]]>Fri, 26 Jul 2013 09:12:40 -0500http://www.phpdeveloper.org/news/19598http://www.phpdeveloper.org/news/19598
Chris Jones has a new post today showing you how to use Oracle and PHP together to process data offline via the Oracle Streams Advanced Queuing feature.

Offloading slow batch tasks to an external process is a common method of improving website responsiveness. One great way to initiate such background tasks in PHP is to use Oracle Streams Advanced Queuing in a producer-consumer message passing fashion. [...] The following example simulates an application user registration system where the PHP application queues each new user's street address. An external system monitoring the queue can then fetch and process that address. In real life the external system might initiate a snail-mail welcome letter, or do further, slower automated validation on the address.

He includes the SQL needed to create the database and configure the queue system as well as start it up and get it ready for requests. He shows how to push an address into the queue for processing and how to get the results once it has completed in both the SQL and from the oci_* functions in PHP.

Link: https://blogs.oracle.com/opal/entry/offline_processing_in_php_with]]>Fri, 17 May 2013 09:49:26 -0500http://www.phpdeveloper.org/news/19588http://www.phpdeveloper.org/news/19588
In his latest post to his site Chris Jones shows you how to update the Zend Framework 2 tutorial app (quickstart) to make it work with an Oracle database instead.

This post shows the changes to the ZF2 tutorial application to allow it to run with Oracle Database 11gR2. [...] The instructions for creating the sample ZF2 application are here. Follow those steps as written, making the substitutions shown [in the rest of the post].

The full schema definition is included in the post, complete with the same sample data as the tutorial. He includes the updates you'll need to make to the database configuration for the OCI8 connection and changes to the code to accommodate the Oracle data format (mostly uppercasing everything).

Link: https://blogs.oracle.com/opal/entry/getting_started_with_php_zend]]>Wed, 15 May 2013 10:55:41 -0500http://www.phpdeveloper.org/news/18879http://www.phpdeveloper.org/news/18879
As Chris Jones has posted on his Oracle blog, there's been a recent update to the Underground PHP and Oracle Manual with a complete refresh of content from more recent versions of the powerful database.

The Underground PHP and Oracle Manual is designed to bridge the gap between the many PHP scripting language and the many Oracle Database books available. It contains unique material about PHP's OCI8 extension for Oracle Database, and about other components in the PHP-Oracle ecosystem. It shows PHP developers how to use PHP and Oracle together, efficiently and easily.

Updates include new content related to the Oracle XE 11g release and the latest updates to their OCI8 extension for PHP. Other updates include information about using PHP with Oracle TimesTen, NetBeans and Oracle Tuxedo as well as getting PHP installed on the Oracle Solaris operating system.

]]>Wed, 12 Dec 2012 10:27:31 -0600http://www.phpdeveloper.org/news/18747http://www.phpdeveloper.org/news/18747
According to a new press release on the Oracle.com site today, they've announced the company's investment in the popular PaaS provider (and big sponsor of several PHP conferences, events and the community) Engine Yard. From the official press release:

Oracle announced today that it has made a strategic minority investment in Engine Yard, a leading cloud development platform that supports Ruby, PHP and Node.js, popular web development languages. [...] In conjunction with this investment, Oracle and Engine Yard expect to work closely together to provide cloud application developers with a greater choice of development and deployment options. The two companies are expected to connect their respective PaaS offerings to enable more rapid development of applications in a secure, reliable and scalable environment.

No word yet on how this will integrate with Oracle's own cloud solutions but it should be interesting to see what comes out of it. Congratulations to the Engine Yard folks on the investment!