June 30th, 2007

Here is an interesting problem, over seven years ago PHP 4 was released. It was a vast improvement over 3 and the world adopted it quickly. When PHP 5 was released the move was much slower and is still the minority on web hosts.

I have moved all of my personal PHP projects to 5 a while ago but professionally I am stuck maintaining an application in 4. I am constantly disappointed when I come up with a solution to only realize that the function I want to use is only in 5. (We are going to be moving to 5 later this year).

The crux of the problem is in how many web hosts use Plesk/cPanel/etc and they haven’t moved their default settings to 5.

Now there is a movement for OSS developers to move their projects to only support 5 called “Go PHP5″. Read the thread here

Update: and now the website it up GoPHP5! I don’t see wordpress on the list, come on Matt!

May 31st, 2007

Lifehacker has a pretty good summary on how to write a Firefox extension. This is something I’ve wanted to explore since Firefox introduced SQLite in 2.0.

I’ve been rolling my own online bookmarking for a while. A while ago I started off with Furl.net and didn’t move to del.icio.us with all of the cool kids because Furl would save a snapshot of the link, which can be very helpful if something gets moved or goes down. I was intrigued with Clipmarks and the ability to save a section of the web page. But found it to be too heavy. See, I’m picky.

I’ve also been jealous of some of the extensions that have been introduced for these bookmarking platforms. I’ve come up with series of bookmarklets to achieve much (scoring, tagging, referring url) of what I’ve been missing. But, I’m not able to achieve more in-depth intraction. (I want to add all the url’s I visited to get to the link, save portions of the page, and save an image of the page)

Hopefully these links will help me build that extension I’ve always been dreaming about.

April 10th, 2007

Ever been reading a site and they show an email address as: “name AT example DOT com” to try and fool email address harvesters?

Well I have 22 million reasons why this is a stupid method. Anyone want to buy an email list?

March 28th, 2007

I was playing round the other night can came up with this SQL to solve a popular tongue twister:

SELECT
COUNT(woodpile.is_chucked)
FROM
woodpile,
woodchuck
WHERE
woodchuck.can_chuck = 1
AND
woodpile.is_chucked = 1

Here is another one:

SELECT COUNT(pepper.picked) FROM pepper WHERE pepper.picked_by = ‘Peter Piper’

A couple more with the tongue twisters:

Which wristwatches are Swiss wristwatches?

SELECT watch.* FROM watch WHERE watch.make = ‘Swiss’

Which witch wished which wicked wish?

SELECT witch.name FROM witch WHERE witch.wish_type = ‘wicked’ AND witch.type = ‘wicked’

Who washed Washington’s white woolen underwear
when Washington’s washer woman went west?

SELECT
washer.name
FROM
washer
WHERE
washer.gender = ‘female’
AND
washer.went != ‘west’
AND
washer.washed = ‘underwear’
AND
washer.fabric = ‘wool’
AND
washer.washed_for = ‘Washington’
February 27th, 2007

Problogger asks: What makes you unsubscribe from a blog’s RSS feed?

There is some interesting insight in the comments. I have tried to compile a summary of the comments so far. (I’ve stared my peeves)
17 - Too many posts
12 - Topics not focused or changes topics too often
10 - Not enough posts
10 - Not full text feeds (*)
9 - Repeated stories or unoriginal (*)
6 - Reader not interested
6 - Too long of stories or bad post layout
4 - Negative stories or attitude
4 - Too much self promotion
4 - Low quality of posts
3 - Story keep reappearing (usually frequent editing) (*)

I find it funny that not enough and too many posts were in the top three answers.

January 3rd, 2007

I had been frustrated with the state of Edgy’s php packages. I have been developing on 5.2.0 since attending the 2006 Zend Conference. I could have built everything myself, but I have been looking for an easy way to maintain the server. I can always move to a custom compiled server if it becomes necessary. Also, I haven’t seen backports for Feisty yet.

My solution has been Dotdeb. Not only do I get updated php binaries but they include the Suhosin Patch.

The installation is very easy:

Edit /etc/apt/sources.list to include
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

then just run
# apt-get update
# apt-get upgrade

you will have to consent to unsigned packages. You should now have updated PHP packages.

October 10th, 2006

Merlin from 43folders has started a podcast, Productive Talk with the evergreen topic of Procrastination. He has come out of gate strong, getting David Allen of “Getting Things Done” as his first guest. The audio is a little uneven at first but settles down. Overall, very good and I am looking forward to the next one.

July 6th, 2006

After getting PDO sucessfully installed on Ubuntu, I discovered that it would segfault on otherwise normal queries. I also fount out that I am not alone. Stuart Herbert has documented the PDO segfaults. This was sort of disappointing, but at least it was assigned in PECL’s bug tracking system.

June 7th, 2006

I had recently purchased a small computer to act as my development server but I also wanted it to act as second desktop machines. I have plenty of experience using Debian as a server, but I decided to try the new distribution from Ubuntu.

The install was pretty easy including getting PHP 5.1.2, Apache 2, and MySQL 5 installed using the familiar apt-get command. (I wish they had included php 5.1.4, but this wasn’t a deal breaker)

I was dismayed to find that they didn’t have a package for PDO extension (PHP Database Objects). So I installed the PDO via the pecl command:

bhiv@devserver:~# pecl install pdo

It downloaded, phpized, configured, compiled and installed just fine. The only thing I had to do was add the line:

extension=pdo.so

to the files:

/etc/php/apache2/php.ini
/etc/php/cli/php.ini

(and restart apache)

But what good was the PDO without a driver for a database, in my case MySQL. So I tried:

bhiv@devserver:~# pecl install pdo_mysql

It downloaded, phpized, then failed on the configure command with the error:

configure: error:
You’ve configured extension pdo_mysql, which depends on extension pdo,
but you’ve either not enabled pdo, or have disabled it.

After trying a number of ways to force it to install, trying to foce the dotdeb distribution to install I found the simplest solution was to manually download the package with the following commands:

bhiv@devserver:~# wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz

bhiv@devserver:~# tar zxvf PDO_MYSQL-1.0.2.tgz

bhiv@devserver:~# cd PDO_MYSQL-1.0.2

bhiv@devserver:~# phpize

bhiv@devserver:~# vi configure
comment out lines 4163-4173

bhiv@devserver:~# ./configure

bhiv@devserver:~# make

bhiv@devserver:~# sudo make install
add the lines:
extension=pdo.so
extension=pdo_mysql.so
to the very bottom of the file.

bhiv@devserver:~# sudo vi /etc/php/apache2/php.ini

bhiv@devserver:~# sudo vi /etc/php/cli/php.ini

bhiv@devserver:~# sudo apache2ctl restart

Hopefully there will be a php-pdo package soon. But until then, this was the simplest way to get PDO installed on your new Ubuntu system.

May 15th, 2006

Time-management software

Bill Westerman has joined the back-to-paper movement. Here are a couple of Bill’s ingenous methods for managing his time and to-do lists in his notebook.

Bill prefers the Miquelrius notebook (shown here).

Roll over the photo to see how it works.” (via Communication Nation)


Next Page »