Making Laravel Work in Zend Studio 10

Executive Summary

Below is the story of how I figured out how to get Zend Studio and Laravel to play nice together. My solution works, but may not be the "proper" solution. It will get rid of the squiggly lines under the Laravel framework’s methods and classes, and also adds support code completion for those method to boot. For the impatient, here are the instructions, without all the background.

  1. Install the Composer plugin from Zend Studio.
  2. Right click on your project and choose "Configure > Add Composer Support"
  3. Right click on the project again and choose "Properties."
  4. (more…)
No Comments Read

Tips for Taking the Zend Certified Engineer Exam (PHP 5.3)

Over the last couple weeks, several people have asked me for my tips on taking (and passing) the Zend Certified Engineer exam for PHP 5.3.1 I have only a few.

Tips

  • Read and Follow the Study Guide

    Zend produces a handy study guide, available for download from the Zend website.2 The guide explains the test format and lays out the areas of concentration and their relative importance to one another. This guide is the only authority, as far as I know, regarding what the examination actually covers. I was not able to find any current literature from a third party relating to the ZCE for the current version of the exam. Get the study guide and treat it as a Bible.

  • Know Your PHP

    Some of the certifications I've taken over the years 3 are broad-knowledge stuff. You can get a book at the local library or Amazon, study your heart out, and learn everything you need to know to pass them.

    The ZCE is not one of these certifications.

    Instead, the ZCE is testing specific expertise with a specific task. You really have to have quite a bit of PHP experience under your belt before attempting it! This is not an entry level cert.

    On the topic, I didn't take any of the courses offered by Zend regarding the exam. I don't know if there is some way they can manage to teach enough during them to make taking the exam possible for a neophyte, but personally, I doubt it.

  • Don't Panic

    The ZCE has 70 questions and allows the test-taker 90 minutes to complete them. That works out to an average of just over 77 seconds for each question. This doesn't sound like much time, but I breezed through the entire exam, checked over my answers twice, and still left the testing facility with 20 minutes to spare. If you know your PHP, then 77 seconds is more than enough time to read the question and find the most appropriate response.

How Did You Study?

I didn't spend any real time on the basics of PHP like operators, precedence, or OOP concepts. If you feel like you need to then you're probably not ready for the exam.

I did spend quite a bit of time going over a very large (700 or so) stack of flashcards with PHP builtin functions and parameters. I wanted to be able to recall the purpose of a function and all its parameters from memory. This was harder than I thought it would have been. As a PHP developer, I'm used to having access to the internet and have always made liberal use of the PHP Manual. In many cases, I know which function I need to use, but check the manual for the order and type of the parameters. Often, the software I'm using has code completion hints and I don't even have to work that hard. I wanted to be sure I could spot a mistake in one of these calls, and so I was forced to memorize these things.

How Long Did You Study?

In the end, I'd say I put in about 3 weeks of solid studying before taking the exam. It wasn't the only thing I did (by far) but it was on my to-do list everyday for about that long. I had tried to study for the exam over the summer, but found that without a definitive date for taking it, I simply lacked the motivation. In late September I scheduled my exam date, and used the ticking clock to my advantage.

Was It Worth It?

Yes.

In fairness, I can't tell you if taking the exam has made finding work any easier yet. But I can tell you that I am a better PHP programmer for having studied for and taken it. I'm far more confident in my knowledge of the language, and far more confident in knowing exactly what PHP is capable even in areas I haven't personally worked with.

  1. I imagine these tips will work just as well for the Zend Certified PHP Developer Exam based in PHP 5.5, but I haven't actually taken it, so caveat emptor.  (back)
  2. login required  (back)
  3. particularly CompTIA  (back)
No Comments Read

I’m Now a Zend Certified Engineer in PHP 5.3

Earlier this week I left my comfortable desk, covered in flash cards and notes, and made a trip down to the nearest Pearson VUE testing center to sit for the Zend Certified Engineer PHP 5.3 certification. After several weeks of studying, and meaning to get around to the exam for a long time now, I passed.

This is, essentially, just an official announcement. I am now a Zend Certified Engineer, and can use this logo without getting sued or what not.

Zend Certified Engineer: PHP 5.3

Later in the weekend, I'll be posting again two answer the two questions everyone has asked: was it worth it, and what tips might I have about the test.

And before you ask, I plan on taking the PHP Developer test in (relatively) short order.

No Comments Read

AJS Footnotes 2.0 Progress Report

I just wanted to post something quick with regards to my progress on the AJS Footnotes update.

I am making forward progress, and think I'll be coming to a milestone with some of the troubles the earlier versions had some time today.

The two sticking points were JavaScript and WordPress security issues.

The JS trouble is a coupling of the original plugin doing nothing to ensure that the popup generated by the footnote had room to fit in the viewable area, and user requests to reduce the weight that the plugin adds to the page. I had hoped to makes use of the jQuery UI position function, but killed it due to the fact that UI uses relative positioning, and this causes some "jumps" when the footnote is first shown. I've been forced back the the drawing board to get the behavior right.

I had originally intended to use a file write to create the JavaScript include file on-the-fly so that the options could be passed directly. But it occurred to me that when I setup a hardened public WordPress installation, I remove the rights of the web user to write to the plugins folder.1 I didn't want to encourage people to undermine the already shaky security that WordPress has shown lately, so that idea was scrapped. Instead, I've turned towards creating a jQuery plugin file. This file would be small (especially once I minify it) and cacheable, and would mean that only a single line of JavaScript code would need to be added to the pages themselves.

CSS has given me similar headaches. It seems that, given the hooks available, I can't examine the post/page content before enqueueing the styles and JS. This means that I have to enqueue them on every page, even if the content on that page will not require the plugin functionality.

In any case, I hope to have the new version rolled out by the end of the week.2

Just wanted to keep everyone abreast of the recent progress.

  1. instead relying on SFTP access  (back)
  2. I actually think it’ll be sooner, but given my last estimate getting blown out of the damn water, I think I'll stick with this.  (back)
No Comments Read

AJS Footnotes 2.0 Coding has Begun

I just thought I'd post quickly about the upcoming update to AJS Footnotes. What started as an update to address some basic issues with the original plugin (oversights on my part, really) has instead led to a much broader revisioning of the plugin's code.

Here you can see the whiteboard ready to go. AJS Footnotes Roadmap
AJS Footnotes' Roadmap

New features include:

  • A note preview area so you can see how the changes you're making to the note's look and feel affect it in real time.
  • Better hover coverage to make it easier for the end user to "capture" the note
  • Moving the CSS and JS to external, cacheable files. (If write permissions permit.)
  • Alpha channel support1 (because the shadows look god awful without it.)

The new version will also fix some of the bugs that have been brought to my attention including:

  • The lack of a z-index declaration that allows the notes to slide behind other page elements (thanks, Robert)
  • The weirdness in where notes sometimes appear.2 (Thanks, Aaron)
  • The height bug that sometimes causes the following elements to clear in an unholy way (Pointed out by Bastian and originally fixed in the 1.1 version that never seemed to take.)

I had promised several people that this version would be out by the end of this weekend. It is currently extremely early on Monday, so I'm obviously not making that deadline. Still, with the exception of Earth Day celebrations tomorrow, this week is wide open. With a little luck, I might even get the update into WordPress by mid-week, and the WordPress automatic update might even work this time.

  1. where appropriate  (back)
  2. This fix involves using the jQuey-UI platform, rather than trying to do all the appropriate math myself.  (back)
Tags ▲ Categories ▲
No Comments Read

On the Recent WordPress Attacks

What's Happening

As most everyone is by now aware, there's a botnet going around attacking WordPress sites on the internet. The bot attempts to gain access to the administration section of the site by brute forcing its way through the admin login.1

The attack is rather massive in nature, with some 90,000 IP addresses currently identified as having been compromised. It would seem the idea is to place an infected file into the WordPress installation which can then, presumably, be used in later attacks against other targets. A botnet built on web servers is a huge threat, given that servers generally have significantly more bandwidth than your average home computer.

In some instances, this attack has led to an inadvertent DDoS attack on some servers (including this one.)

(more…)
  1. Located, by default, at /wp-admin  (back)
No Comments Read

WordPress Plugin Update Trouble

This is a quick post to see if anyone out there can tell me what I've done wrong updating my recent AJS Footnotes Plugin.

Late last night, I received an email from Bastian Zimmermann over at Deliberate-It.de letting me know that the plugin was causing a serious CSS bug. I was able to track the bug down, and get Bastian fixed up. Then I went ahead and did the following to the plugin code.

  1. I edited the ajs-footnotes.php file to fix the bug.
  2. I changed the trunk code stable tag to 1.1.
  3. I copied the trunk code into a new 1.1 folder under the tags directory.
  4. I committed the entire thing to the WP repository.

But, as for this morning, the WordPress Plugin Page doesn't show the new version as being an update. Worse yet, it doesn't push the new version as an update in the WordPress system. The download from WordPress is of the correct 1.1 version, but it's still listing 1.0 on the button, as well as the "Current Version" in the "Compatibility" section on the lower right.

Anyone have any idea what I've done wrong. I would like to fix this before the same oversight causes another user trouble.

Thanks in advance!

No Comments Read