The Results are In…

Well, no more being anxious about the Zend Certification Exam (taken two weeks ago – does that make me impatient?) – an email came today that sealed my fate for the PHP 5 version of the test…

I passed! :) I am officially a PHP 5 Certified Engineer :)

Woo! It’s funny how, no matter how old you get, you always (well, I always) seem to feel the the same way after I’ve taken a test and am waiting on the results. Either way, it’s always a relief to find out the result – good or bad. Thankfully, it turned out good this time :) Congrats to all of the others out there that took the test and are new ZCEs!

PDO + Oracle = Loads of Anti-Fun

Okay, so in playing around with some of the somewhat bleeding edge stuff (well, okay, so PDO isn’t that bleeding edge) on my development server, I’m trying to get Oracle support working for a simple script. It doesn’t want to seem to cooperate, and I just wanted to make sure I’m not doing something I shouldn’t be (or are forgetting something) – because it still dosen’t work.

Here’s what I’ve done so far:

  • compiled PHP 5.2.0 with:
    • –enable-pdo=shared
    • –with-pdo-oci=shared
    • –with-sqlite=shared
    • –with-pdo-sqlite=shared
  • Installed both PDO 1.0.3 and PDO_OCI 1.0 from scratch
  • Verified that the modules are in the “ext_dir” specified in the pnp.ini
  • added the lines to load them dynamically:
    • extension=pdo.so
    • extension=pdo_oci.so
  • When I make a phpinfo() page, it shows both that PDO is loaded and that “PDO Driver for OCI 8 and later” is “enabled”

And, of course, the code:

[php]
$sql=sprintf(‘generic SQL here’);
$arr=array(
‘oci:dbname=DBINTNSNAMES’,
‘user’,
‘pass’
);
$dbh = new PDO($arr[0],$arr[1],$arr[2]);
[/php]

This yields the lovely error message below:
“Fatal error: Uncaught exception ‘PDOException’ with message ‘could not find driver’ in /www/web/test/getbal2.php:36 Stack trace: #0 /www/web/test/getbal2.php(36): PDO->__construct(‘oci:dbname=PHIS…’, ‘user’, ‘pass’) #1 {main} thrown in /www/web/test/getbal2.php on line 36

Suggestions? Ideas? Is there something I’m missing?

A Look Back @ ZendCon 2006

Well, I’m back from this year’s Zend/PHP Conference & Expo out in San Jose, California and can honestly say I had a blast. I’ve talked to people in the past that have gone to other conferences and have had fun, but this experience was more than that for me. Not only did I get to listen to some great talks, but I also got to meet up with some of the people I write about every day on PHPDeveloper.org and have never gotten a chance to shake hands with – including Aaron Wormus, Chris Shiflett, Ben Ramsey, the attending #phpc gang, and various others (as I forced my t-shirts upon them).

As mentioned, the talks were great, and the conference planners did a pretty good job keeping dupes out of the schedule. There were some that overlapped a bit, but I think that just happened because of the wide range of some of the talks. Here’s some of the ones I attended:

  • Robert Richards – Advanced XML and Web Services
  • Chris Shiflett – Essential PHP Security
  • Eli White – High Volume PHP & MySQL Scaling Techniques (standing room only)
  • Chris Jones – The Experience: Faster PHP with Oracle
  • Aaron Wormus – Moving to PHP5 with Style
  • Jaisen Mathai – Efficient development Using PHP, JSON and AJAX
  • Ilia Alshanetsky – Caching Systems
  • Andrei Zmievski – Unicoding with PHP6
  • Sebastian Bergmann – Testing PHP Applications with PHPUnit
  • John Coggeshall – Create a Sophisticated Web Application in 45 minutes – Using the Zend Framework

Definitely a busy week, but all of the talks I went to were great. I even learned a few helpful hints from them. ;) Overall, though, it almost made me feel back for still being stuck in PHP4 Land where I work. There’s so much more that PHP5 has to offer, and making a move to it wouldn’t be that bad *crosses fingers*. I already had a PHP5 install on the test side to work with – now it’s just a matter of really getting in and making the changes.

My wife came along with me for the week and we managed to get out and do a few things during the day and evenings. We managed to get out to a local attraction, the Winchester Mystery House to get the tour (we’d wanted to do the flashlight tour on the 31st, but it was all sold out) and, post-conference, went up to San Francisco for what was, quite possibly, the rainiest day of the whole week. It turned out good, though, and we ate at a wonderful little place off the main strip – Scoma’s – with some of the best lobster bisque I’d ever had.

Needless, to say, it was a great week, and here’s to hoping I get to make the trip back out there next year. I’d be good to see the familiar faces again, and to get to catch up on all of the latest developments in the PHP world. Thanks to Zend for a fun week, and thanks to the DoubleTree for the nice facilities, and, most important of all, thanks to Axis Open Source for the free WiFi. There’s nothing more frustrating than a internet-related conference without an internet connection…

A ZendCon T-shirt Wrapup

Update: if anyone happens to know if a cheap way to get things overseas from the US, please let me know. I want to send these shirts out, but I can’t seem to find a cost-effective solution.

So, I’m back from this year’s Zend/PHP Conference & Expo and am looking over the damage done to the PHPDeveloper.org shirt population (my wrapup of the conference will come in another post). From the looks of things, I apparently underestimated the correct size of the average PHP conference goer. I started off with 50 shirts of varying sizes (M/L/XL) divided up into mostly XL shirts. It seems, though, that most of the people that were given a shirt by the end of the week ended up with a Large size (not the XL like I had figured – no offense meant to the other coders out there).

So, as a result, here’s the tally of what I have left – out of the 50 t-shirts, there’s 23-ish (I owe one or two to different people) of them left to be up for grabs for anyone out there. It’s first come, first serve, so if you want one, get while the gettin’s good:

Medium: 8
Large: 5
Extra-Large 10

(I’ll try to keep this post updated as the shirts are dropped from the list)

All you need to do to get your hands on one of these shirts is to drop me a line and let me know your shipping information. There’ll only be a $7 charge on top of the shipping to help pay for the shirts. Donations of more are always welcome and will go to help the site directly.

If you’d like to see some “action shots” of the shirts and where they were showing up at the conference, check out these great photos:

And, of course, my personal favorite shot – when Cal got up and plugged the shirts as part of his announcements one morning (no, I didn’t ask him to – as much of a surprise to me as anyone).

So, if you’re interested in grabbing one of these shirts (see this other entry for some more detailed photos), email me and let me know.

Things I learned at the Oracle talk

It’s not complete notes from the session, but here’s a few interesting things I caught during Christopher Jones’ talk:

  • Oracle is introducing connection pooling for Oracle->PHP scripts (to be included with version 11g) – database resident connection pooling
  • you don’t need to redo the entire prepare/reparse of the oracle statement just because you change a value of a bind variable. You can just oci_execute and move on…
  • You get better performance if the table statistics are up to date
  • Check the oci8.statement_cache_size php.ini setting to tweak your fetching performance
  • Use oci_set_prefetch function (PHP5) to get a bit permance increase
  • ‘set autotrace on explain’ can give you more stats on your query and how it’s performing
  • Look into using TKPROF and STATSPACK (admin)

Looks like a bright future ahead for Oracle and PHP – especially with the new connection pooling. I can’t wait to give it a shot…