All entries of my technical and business blog

Book Review: Expert PHP 5 Tools

Jun 30, 2010 php

Where was this book 4 years ago? Or even 2 years ago? (Uh - it was published in 4/2010… so… just in the author’s head apparently).

Time off for B-day is done

Jun 29, 2010 misc-web
Normally, I’ve been trying to release a new blog entry every Tuesday. I took this last week off to celebrate my birthday. Tomorrow should restart the grind. :)

Restrict your .git directory on live site

Jun 15, 2010 git security

Do you use Git to manage your repository? If so, do you use it to check out code onto the server as well? If you do, you really should restrict access to your .git directory if it’s in your public root. (If you’re using things like Zend Framework, chances are your root directory is not your public directory, so you have less to worry about.)

When uniqid is too slow in PHP

Jun 8, 2010 php

I just profiled some of my code and found out that the biggest chunk of my processing time was used by uniqid(). I use this to generate form tokens to prevent cross site request forgeries. On one page, I have 6 forms each with its own unique uniqid().

Using ApacheTop with Cronolog

Jun 1, 2010 apache

I love ApacheTop. I love Cronolog. After I installed cronolog and used it in my apache configuration, however, I found it more and more difficult to use apachetop. I stopped using it. Well, I finally came up with a bash script that eases my frustration with calling the proper path names for apachetop. Check it out:

How to Log PHP Errors like a Pro

May 25, 2010 php

The error log can be fun to parse through and figure out what happened. Ok, so if you just read that and agreed, you need to move on. This is not for you. That’s not fun. However, you CAN make error gathering easier on yourself by including the right information in the error log. To top it off, you can present your users with something that is a bit more ‘friendly’ than the standard error display or blank page. Let’s check it out.

Twitter @anywhere proof of concepts

May 13, 2010 javascript twitter

First off, let me just remind you to not be an idiot like I was. I simply found the documentation here and here and went to town. After hours of trying to figure out exactly what was going on, I stumbled across some very interesting comments in the news group: The @anywhere api is not in chirp_preview anymore - but it’s not done either. So some of the stuff won’t work - and that wasn’t my fault! Dang!