All entries of my technical and business blog

PHP developer's shortcut for optimizing mysql

Jul 21, 2007 php sql

PHP developers, raise your hand if you run an explain on each MySQL statement you write and use in your apps! Anyone? Ok… 1… 2… that’s it? Yah, I tend to forget that too, but luckily PHP allows us to cheat. Thanks PHP!

When is a PHP array not an array?

Jul 21, 2007 php

Arrays, return variables, expressions, OH MY! I recently learned a lesson about array functions in PHP not returning what I thought they would. I had a function that returned the value of array_shift()… and then used it in another function. Unfortunately, this generated a strict error and was causing some issues… As usual, I put together a proof of concept. Let’s check out the code example, the error, and then why:

A Better Understanding of Error Reporting in PHP

Jul 19, 2007 php

While working on a website for (“the triangle”), I came to a page running locally that just stopped - blank. This particular website was not using output buffering - so there is no excuse for a blank page.

Two New useful external tools for Eclipse

In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32):

Eclipse Integration with Tortoise SVN

I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way - it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this - so let’s go over the specifics:

Helpful strtotime reminders

Jul 12, 2007 php

Today, Todd (one of the consultants that (“the triangle”) uses) called me up to share a bit of a reminder and also tell me about an issue in the code that was in one of our older modules. There was an issue with the strtotime function converting a year to a timestamp.

Show the right files in PHP Explorer

After I installed Eclipse PDT, I had two project navigators. I closed the native one and kept open the PHP Explorer. PHP Explorer showed my php, css, js, etc, files. It also puts a plus sign to the left of the filenames. Using this view, we can expand the file to see the classes and functions inside of the file without opening it.

The anatomy of a phishing attack - advanced technique

Jul 12, 2007 security

So many phishing attempts lately are just purely pathetic - easy to guess and figure out, mis spelling and grammar issues and just poorly fashioned websites. Although these will work on the novice web surfer, can a clever criminal actually create a phishing site/scenario that can trap the experienced members in your IT department?