Web Developer

HTML, CSS, PHP and a little bit of Javascript. I create tools for online marketers.

PHP: a fractal of bad design

Eevee, on Fuzzy Notepad:

PHP is an embarrassment, a blight upon my craft. It’s so broken, but so lauded by every empowered amateur who’s yet to learn anything else, as to be maddening. It has paltry few redeeming qualities and I would prefer to forget it exists at all.

I'm not qualified to comment, except to agree with more than one of his points.

Via Marco Arment

cPanel Password Syncing

While making some server  changes and resetting some passwords (making them more secure), I ran across an issue where I couldn't log into phpMyAdmin -- even though I was already logged into cPanel.

PHP Configuration Files Are Not Inherited

PHP Configuration Files Are Not Inherited
I had a problem that started a couple days ago on one of my sites, where my custom php.ini file wasn’t overriding the server’s global php.ini file. This meant that certain directives weren’t set and one of my scripts wasn’t behaving.

Learning Object-Oriented Programming

Want to learn OOP? Stanford University offers a number of online courses from its catalog, including Programming Methodology (CS106A), through iTunes University—for free!

Resending Drupal Revalidation Links

On many of the Drupal-based sites I design I use a wonderful module called LoginToboggan, which provides a number of features related to user login. One such feature is the non-authenticated role, which is an interim role that a user can be set to after registering but before validating their email address.

A Sneaky Domain Parking Trick

While making a server change today, I was reminded of a trick that I used back when getting a shared hosting account with unlimited domains was unheard of and add-on domains used to cost an additional monthly fee.

Athough there was a charge for more than one "active" domain on the account, my hosting company didn't charge for parked domains. And I figured out a way to get those parked domains to act just like add-on domains.

The "trick" involves using mod_rewrite to redirect the incoming request to the appropriate directory, by adding this to your root .htaccess file:

When UPDATE Doesn't

Several months ago I became aware of the ON DUPLICATE KEY UPDATE clause of the INSERT MySQL command. This meant that I could use a single command to insert and/or update a database record, without any additional code to determine whether or not I needed to INSERT or UPDATE. Couple that with the ON UPDATE CURRENT_TIMESTAMP option for a timestamp field and I can turn this:

~~~

Customizing Your WordPress Login

There are a number of plugins and tutorials to change the login logo for a WordPress installation, so why another one? Because changing the logo isn’t enough: you probably will also want to change the underlying link—which normally takes the user to WordPress.org.

2011 Site Update

It's been a while (2007) since I made any major changes to the site, but—as you can see—the site looks a lot different now. The design is a custom theme that I'm sorry I purchased; first, because the theme wasn't as polished as it initially appeared to be and, second, because it's not compatible with Drupal 7 and would require a serious amount of rework to make it so. I'll likely start over with something like Omega and create a similar look.

You Don't Need Blog Module

I noticed a change today in the description for the Drupal 7 Blog module: "Enables multi-user blogs." That's a big difference from the description in D6 and D5: "Enables keeping easily and regularly updated user web pages or blogs."  (D4.7 reads "Enables keeping an easily and regularly updated web page or a blog.") Had that description been as simple as that when I first started using Drupal, I never would have enabled the module for a blog.