Thursday Jan 31, 2013

The Oracle 11g Release 2 (11.2.0.3) Database Instant Client for
Apple OS X on Intel x86-64 is now available for download from OTN.
It is supported on the two latest OS X releases: Lion (10.7) and
Mountain Lion (10.8). It provides both 32-bit and 64-bit client
support.

Oracle Instant Client is a simple bundle of libraries that client
tools and programs (like PHP and Ruby) can link with. This allows
those tools to access Oracle Databases.

Tuesday Jan 29, 2013

Who says direct marketing doesn't work? A personal request to blog
the upcoming ConFoo conference (25
February - 1 March 2013 in Montreal, Canada) has, as you can see, been
successful. Although it's been a few years since I spoke there, I
recall how impressive the organization was. The diversity and
continual growth trajectory of the conference over the years is a very
good indicator that you should be involved.

Wednesday Jan 23, 2013

When you want to test a PHP code snippet quickly, it's handy to do it
within your day-to-day environment. For me, this environment is
Emacs. The geben package for Emacs provides an interface to the DBGp
protocol, such as used by Derick Rethans's standard Xdebug extension
for PHP.

With the combination of geben and Xdebug, I can quickly and
efficiently step through execution of local files, examining code flow
and data values.

Working steps to install and use the debugger on command line PHP
scripts are shown below. They are standard enough that they can be
customized to your actual environment.

You probably already have Xdebug installed, since it is the common
debugger and profiler used by most IDEs. Installing geben in Emacs is
straight forward.

Experienced Emacs users will most likely use local-set-key in a
php-mode hook to set a key mapping.

9. Start Emacs and load a PHP file:

$ emacs my.php

10. Press F5 to start the debugger. The script will open in geben
mode and can be stepped through with the space bar.

Geben mode commands can be shown with '?'. They include 'v' for
showing variables, 'c' for run-to-cursor, and 'g' for completing the
program.

Geben can also be used for scripts called via a browser. Start the
geben listener in Emacs with M-x geben and load a script in the
browser, passing an Xdebug URL parameter setting the session name.
This initiates the debug session in Emacs. E.g. Load
http://localhost/my.php?XDEBUG_SESSION_START=my-php-54

11. When you are finished debugging, stop the debug server listener
inside Emacs: