PHP Pear Advantage is Reusable Code, not Library Management

May 3rd, 2007

Whenever I use Pear’s PHP libraries, I cringe at the idea of trying to update a single library of code, shared by multiple applications. Having only one code library to manage was supposed to be one of the big advantages of Pear. But once I install some software, I really try to avoid touching it again for as long as possible.

Whenever I write new code, it just makes sense to use current Pear versions. If I want to upgrade a centralized Pear library, I have to go back and touch all my previous installations that use the library to make sure the Pear upgrade hasn’t broken anything.

To me the better advantage of Pear, is in saving development time by providing a source of reusable code. So I tend to have a separate Pear library for every project that uses it. If a Pear library needs to be upgraded for a security fix, I have to upgrade more than one copy. But this isn’t an issue, because Pear has done such a good job of making their library easy to manage. The upgrade process is automated and pretty quick. The real cost of the upgrade is making sure I didn’t break anything in the code that makes use of the Pear library.

This is the method I use to create individual, project specific Pear installations on my Linux development server.

First, create a separate config file so other Pear installations on the same server aren’t disturbed.

cd /home/mike/project/pear
pear config-create /home/mike/project/pear ./pear.cfg

“/home/mike/project/pear” must start from the root directory and shows the location of the new Pear installation. “./pear.cfg” is the location and name of the configuration file.

To manage the installation, just add this config file to the command line.

cd /home/mike/project/pear
pear -C ./pear.cfg config-show
pear -C ./pear.cfg install cache_lite
pear -C ./pear.cfg list

Google Trends - Someone Was Listening

May 18th, 2006

Google Trends graph showing demand for bean dipGoogle Trends is what I had in mind when I mentioned monetizing traffic data previously. The graph at the right shows the searches for Bean Dip during the last quarter of 2005. The spike it shows at the end of the year is similar to the spike in traffic data shown in my own server logs.

Google included options to limit searches by time and geographic region and automatically displays related news articles and points on the graph showing when the articles were released. Since displaying articles is automatic and not a selectable option, I’m assuming Google has observed the news having a dramatic effect on searches.

Trends confirm that “Christmas” is the king of holidays

The volume of searches originating from an area is not necessarily proportional to the population of an area. “Los Angeles” shows that even though Santa Monica has a population of 87,823 and Los Angeles has a population of 3,845,541, more people from Santa Monica searched for the term “Los Angeles” than people from Los Angeles did.

But when you compare the volume of searches about an area, they appear to be proportional to the population, “Santa Monica vs. Los Angeles“.

Here’s the official Google Blog post announcing Google Trends. And Michael Arrington over at Tech Crunch has an interesting graph from Google Trends that shows a comparison of searches for Google, Microsoft, and Yahoo.

Page Rank Tool

May 7th, 2006

This Page Rank Reporting tool (aka: Page Rank Bean Counter) checks the Google page rank of several urls at once and gives you the option of displaying the results in .CSV format.

I wrote the script myself using a slightly modified version of the PHP pagerank script that’s been floating around the internet. I’ll post the source for the script in a few days.

Itronix XC 6250 Drivers

March 24th, 2006

I originally bought my Itronix XC 6250 laptop to connect to a personal weather station. The monocrome lcd and 133MHz Pentium had plenty of horsepower for that application, but since I took the weather station down, I’ve found little use for it. It would certainly be more usable if I could get the external monitor connection to work. If you know how to activate the external monitor or you’ve got any good ideas about how to use the laptop, let me know.

I’ve had a hard time finding drivers for the laptop, so I thought I’d share some files and information I’ve found useful.

Itronix Documentation

Louis Ohland has some nice documentation on special features of the XC6250, including keyboard shortcuts. When the system locks up, hold down both mouse buttons for about 10 seconds and it will reboot. He’s also got BIOS upgrades if you think you need them.

Itronix Drivers

Scott Griepentrog has links to windows drivers, but the files are missing. Let me know if you notice the files are back.

The drivers direct from Itronix are hard to find on their site and some of the files appear to be missing. SETUP.EXE is not included, so installation will have to be done manually. It does however include software to monitor the battery and activate the internal modem.

Accurite PassportCard Travel Floppy

Drivers for the Accurite PassportCard pcmcia card with Travel Floppy external drive: Accurite PassportCard Travel Floppy Drivers ~64kb. I’ve gotten these to work with Windows 95. The floppy shows up as drive E: on my system and is also accessible in a dos prompt while windows is running.

To install the floppy drivers I went to Control Panel > System > Device Manager > Other Devices and highlighted the Accurite PassportCard, then Properties > Driver > Update Driver. The floppy drivers beep when Windows is loading if the PassportCard is found.

To boot from floppy plug in the PassportCard, but don’t connect the floppy drive. Reboot and wait for the computer to ask you to plug in the floppy drive. This will also make the floppy accessible from DOS if you don’t have the drivers installed.

Traffic Data As An Asset

January 3rd, 2006

Demand for bean dip on New Years EveTraffic data is an unmonetized asset of the Internet. This graph represents the web traffic on MagicBeanDip over the New Years holiday. The red line represents the average traffic over the past month.

Why Google should care about bean dip

As you can see, there’s a relatively large spike on New Years Eve. These traffic spikes aren’t uncommon and I almost didn’t give it a second glance. But it was a bit larger than usual and I was looking for something to do on New Years Day.

To my surprise, virtually all of the extra traffic was from holiday party planners looking for a new bean dip recipe.

By itself, this is an interesting bit of trivia. But, if I actually made money from selling bean dip, it would be quite valuable. This graph makes it plain that focusing a big marketing campaign on the New Years holiday would be much more successful than at other times.

That’s why bean dip should matter to Google. This type of information is readily available to search engines. It has tons of value as marketing research. And its true potential as an asset, has yet to be tapped.

Cache Page phpWebSite module 0.0.3

November 9th, 2005

Here’s an updated release of the Cache Page module for phpWebSite 0.10.2. Cache Page improves phpWebSite speed by about 6 times faster than without Cache Page.

phpWebSite 0.10.2 left out the pear lib/pear/Cache module, so I’ve included a copy of the pear module distributed with phpWebSite 0.10.1. Copy the patches/0.10.2/lib/pear/Cache directory included with Cache Page to the lib/pear/Cache directory in your phpWebsite 0.10.2 installation.

Download CachePage0_0_3.zip (52kb)

Please feel free to post a comment with the url for your website if you’re using Cache Page.