Hosting CakePHP on GoDaddy
Posted by Timothy on Nov 24, 2010 in PHP, Programming
Found this simple .htaccess fix for getting CakePHP to work on GoDaddy.
mod_rewrite On GoDaddy Shared Hosting
Just adding the leading / fixes the “500 Internal Server Error” I was getting.
Read MoreCentOS 5.2 w/ CakePHP + PCRE
Posted by Timothy on Oct 2, 2010 in PHP, Programming
After wondering why CakePHP’s Inflector::slug() was returning gibberish, I found this post about how to fix it.
Unicode Support on CentOS 5.2 with PHP and PCRE
Read MoreCakePHP MySQLi Connection Timeout
Posted by Timothy on Apr 8, 2010 in PHP, Programming
So, we’ve been wrestling a little with cron jobs that take a long time to do their thing and having CakePHP’s DBO lose connection to the DB. It never checks to see if there’s an active connection prior to saving/updating data and errors out. So today I’ve taken the time to do what I can and fix this annoying problem.
Here’s a little patch.
\cake\libs\model\datasources\dbo\dbo_mysqli.php
function _execute($sql) {
mysqli_ping($this->connection);
if (preg_match('/^\s*call/i', $sql)) {
return $this->_executeProcedure($sql);
}
return mysqli_query($this->connection, $sql);
}
\etc\php.d\php.ini
[MySQLi] mysqli.max_links = -1 mysqli.default_port = 3306 mysqli.default_socket = mysqli.default_host = localhost mysqli.reconnect = On
mysqli.reconnect integer
Automatically reconnect if the connection was lost.
mysqli::ping mysqli_ping
(PHP 5)mysqli::ping — mysqli_ping — Pings a server connection, or tries to reconnect if the connection has gone down
mysqli_ping() will attempt to ping the server. If there’s no connection.. mysqli_reconnect will establish a new connection and all is well again in CakePHP.
Read MoreAndroid UI Collaboration Community
Posted by Timothy on Jul 30, 2009 in Android, Programs
I’ve been really unhappy with a lot of the Android apps and their UI. One of the biggest mistakes I’ve seen is a simple input line for a username or password where pressing enter makes the input line expand. Another issue I’ve seen a lot is when a configuration/settings screen doesn’t auto-format when in landscape mode. How are such simple UI mistakes made?
I’d really like to get community feedback on the best practices for UI development. Make this a common ground and ‘go-to’ place to help out developers who aren’t so ‘UI-savvy’.
By creating common behaviors users can anticipate what’s going to happen next because– well, it’s the same across all applications. This is one of the reasons why iPhone apps pretty much rock. The UI is silky and things ‘act’ as the user expects them to. There’s no guess work involved. Android needs this to become a stronger platform and even more popular across hardware vendors.
For those of us who’ve been following the ‘Android/G1 hacking scene’ have witnessed some of the UI development that HTC has produced. (Rosie/Hero). None of that would be slick if it weren’t for HTC taking the time to think about the users experience.
So, please help me in getting the ball rolling and lets begin defining the specs for Android UI development!
Read MoreMust have G1 Android Apps
Posted by Timothy on Mar 16, 2009 in Android, Gadgets, Programs, Software
I’ve checked out most of the available Android Market– I go through it almost nightly to see what’s been added. The options are a bit limited, but here’s a good list of apps I’ve found very useful and hopefully you will too.
Power Manager
This application adds NEW power settings to the phone (e.g. how long the screen is on during a call, if device stays on while the keyboard is open, etc.) and allows you to quickly view and change other phone settings depending on different conditions (e.g. turn off the GPS when the battery level drops below 30%, lower the brightness of the screen when on battery power, change the screen timeout if on A/C power, etc.)
It comes with a set of predefined profiles and automatically starts working after installation.
Unless you want to change any of these definitions or use advanced features nothing else has to be done after the program is installed.
StarContact
StarContact allows you to search for contacts in so many different ways. It really should be built into Android. You’re given a few different search methods along with an on-screen t9 like keyboard which is easy to use without fat-fingering letters.
Useful Switchers
Useful Switchers is great for quickly turning on/off G3, Wifi, GPS, and all the other commonly toggled items on the G1. There’s a few extras included such as screen brightness and it’ll even give you a little display about your battery and memory usage.
Missed Call
Missed call allows you to actually use that tiny little RGB LED in the ear piece for different types of events. Such as a missed call, incoming SMS or Calendar event. It also allows you to configure custom ringtones for each event and even periodic reminders. Now you don’t have to pick up your phone to see if you have any pending events.
K-9 Mail
K-9 Mail is a fork of the original email client that ships with Android with a bunch of bug fixes and a number of extra features. The bug fixes along are reason enough to install this app.
ConnectBot
Read MoreThis one is for the techies! ConnectBot is a complete SSH Client for Android. ConnectBot allows you to SSH into a linux/solaris or (other unix flavor) machine and remotely control it, read email with mutt/pine/elm or even IRC or MOO.