why?

I'm a web developer/sysadmin/host (NERD TRIPLE THREAT!) and this is my attempt to write about...leaving the house. Sometimes. Like, to go backpacking. And take some pictures. And justify spending the money on all the gear WHY SO MUCH?!?

So check back weekly for all the smrt missives! And the dumb tweets!

Also hiking things!

Feel free to write and complain.

php whiny, deux
28 September 2016

Remember that previous thing? MAKE SURE YOU DO THIS PART BECAUSE I DIDN'T AND I AM A CAUTIONARY TALE

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/YOURUSERNAME/public_html/php.ini
</IfModule>
<Files php.ini>
  order allow,deny
  deny from all
</Files>

in root folder .htaccess. You want things to work in all the folders, right?

multitool
21 September 2016

It seems there are few things that setting allow_url_fopen to "On" cannot fix.

php whiny
31 August 2016

So a customer requested an update to their PHP configuration file (we give them their own .ini file but they cannot access it directly because WE ARE JOB CREATORS). Evidently a WordPress plugin needed the max_input_vars increased (it's 1000 already ARE YOU TRYING TO NAIL DOWN EVERY SHINGLE ALL AT ONCE? Strong roof, that). Easy change, just modify the line and back to the BBQ.

Wrong.

I checked --the right php.ini file is loaded. The new change took, but now previously edited items are showing undefined values. Whuh?

Well, it seems phpinfo will not necessarily inform you if you have a syntax error in the php.ini file. You know, something dumb like using a colon instead of a semi-colon for a comment. DUHRRR.

Important safety tip: Check your colons, people.

not today you don't...?
18 November 2015

So when checking dates in SQL using 

<= CURDATE()

I was running into an issue with it not recognizing the EQUALS part. After some digging, it turns out when the database field is DATETIME, you need to use

DATE(your_date) <= DATE(NOW())

instead.

turn the thingy
7 April 2015

Now this blog has pagination. Huzzah. And it's not all one monolithic post list on the first page.

You get four at a time and you will like it. (Unless someone complains.)

What the BLERGH
16 May 2014

Ever try to vertically center text in a div and it's just not working correctly on the Mac? But it's spot-on correct on the PC? Or vice-versa?

You've tried everything: the line-height set to font size, or 1px lower. You've vertical-align'ed: center the hell out of evertything in your CSS file. No matter what you try, nothing seems to make a difference.

In desperation you switch from your beautiful (expensive, too!) custom font and fall back to plain old Arial as a last-ditch effort to get something to look right. And BINGO it's now perfect.

What the....?

Well, it just might be the font file's fault. Evidently the font designer needs to account for something called Vertical Font Metrics. So, depending on what metrics they use to determine such things, you can wind up with odd display behavior between browsers and OSes.

Now, about this bold/bold thing....

Refractalling
30 January 2014

The trouble with code refactoring is knowing where to stop.

Updating a codebase developed over 15 years is a miserable endeavor. So much that made sense in 1999 really doesn't hold any water today. The trouble is, you can find this everywhere you look. "I really should do it THIS way, and while I'm at it best practice says do THAT tooARGGGHHHHH I BROKE IT!!!!"

Trying to find the sweet spot you just wind up with This Is Good Enough Move On.

So here's a hard-found tip about how to call a Smarty plugin function -- you delineate parameters with spaces, not a comma or a bar. You need to do this

{customer_functions expires=$cust[c].expires paymenttypeid=$cust[c].paymenttypeid assign='rowclass'}

This lets you visually show whether a row is overdue and what payment type they are using. Comma-separated would be a lot easier to read.

Let's see what else it takes longer to figure out with Smarty than it should.