Creative Web Design & Development

MindPalette™ LLC is a creative web development company based in Indianapolis, IN. We are currently in a state of transition, and will be shifting most of our development focus to:

  • PHP Form Processing Scripts (new versions to replace NateMail and ProcessForm)
  • Joomla! Extensions (Components, Modules, Plug-ins & Templates)
  • WordPress Themes & Plugins
  • jQuery and JavaScript Plugins & Scripts

Though no longer actively developed, we will continue to offer free downloads of our GoLive Actions. The older Scripts and Tutorials are also still available, though future content and development will be in our new Development Blog.

MySQL 5.6 Update – Strict Default

Yesterday I updated an in-house server’s MySQL version from 5.5 to 5.6 and ran into what seemed to be a ton of new problems, but it was all due to a new default MySQL configuration setting. If you’ve just upgraded and you’re getting lots of errors about default values and invalid value types (empty strings for integer fields, etc.), it’s probably the same issue. MySQL 5.6 defaults to more strict data handling for InnoDB (and other transactional) tables.

It would obviously be better to fix the errors, but if you’re working with a lot of old scripts and need a quick temporay fix, try editing your database configuration file (my.cnf) to change this:

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

…to:

sql_mode=NO_ENGINE_SUBSTITUTION

For more information, see: http://dev.mysql.com/doc/refman/5.0/en/sql-mode.html#sql-mode-strict

Flat Flashlights from Mock-Epic LLC

Flat FlashlightsLast week we launched a new retail e-commerce website from our sister company, Mock-Epic LLC. I really like this product – magnetic flat flashlights with bright LED bulbs and full color artwork on a high-quality plastic label. They are from the SmashLight® family of products from Bentcil®, and we’re making them available retail, in small quantities and bulk.

The SmashLight® Messenger™ is our lowest price option, with an on/off pressure switch, large artwork area, and extra flat (.25″) design.

The SmashLight® Glow™ is .5″ thick and includes a physical on/off button and a fantastic backlit art area illuminated by 2 additional LED bulbs.

This is a product I’ve decided to sell because I like it so much… they’re hanging on my refrigerator, metal filing cabinet, electrical box and stashed away in half a dozen other places. I hope you like it too. For more information, see Mock-Epic LLC or FlatFlashlights.com.

PHP Broken Array from json_decode Object

I ran into an odd PHP thing (bug?) today. I had an object that had been extracted from a string using json_decode. After type-casting it to an array, any entries stored with numeric keys were inaccessible when calling by key, though iteration worked fine.

Here’s a simplified example:

// make an associative array
$myList = array(
	2=>'two',
	4=>'four',
	6=>'six',
	8=>'eight',
	'nine'=>'nine'
);
// json encode to string
$myList = json_encode($myList);
// json decode to object
$myList = json_decode($myList);
// typecast back to array
$myList = (array) $myList;
// test output
$test1 = (array_key_exists(4, $myList))
	? $myList[4] : 'nothing!';
$test2 = (array_key_exists('nine', $myList))
	? $myList['nine'] : 'nothing!';
echo 'test1: '.$test1.', test2: '.$test2;

Read More »

Advertisements: