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 MoreEaster Sunday Trance Mix
Posted by Timothy on Apr 7, 2010 in Random Babble
Spent the night putting together a relaxing trance mix– Enjoy!
Audio clip: Adobe Flash Player (version 9 or above) is required to play this audio clip. Download the latest version here. You also need to have JavaScript enabled in your browser.
Read MoreAdventure in Game Development
Posted by Timothy on Mar 19, 2010 in Random Babble
Since my ADD is off the charts, why not add one more thing to the list of distractions? I’ve been tinkering with NeoAxis Game Engine which is built on the Ogre Engine. I’m quickly finding out it’s quite difficult to be everyone while developing a game. There’s so many different roles that need to be filled. There’s menus that need to be developed and coded for using the tools provided by the engines framework. There’s graphic elements that are needed for these menus. After that, there’s the in-game UI that needs to be designed and coded. You can’t have one element without the other. Going solo in game design could take years to complete anything ready for the masses– And this is with the ‘hard parts’ already done for you (3D, shading, lighting, physics, camera POV, etc). Even with a team of 3-4 people I could see a project taking years to complete. The biggest problem I’m having now is deciding where to start. Do I start on game UI? But I need menus to start/exit the game. Do I start on the characters in the game? They need weapons– Ugh. Weapons. You could spend a full week or more with modeling, skinning, assigning attributes and coding a single weapon! As I’m writing this my thoughts are all over the place just trying to describe how much crap needs to get done! I’m sort of hoping I’ll have some friends to help guide me and keep me on track. It’s just a personal project of mine and I don’t intend on releasing anything to the public. Just having fun experimenting.
Read More