Published: Wednesday, January 2nd, 2008

I can’t remember where exactly I heard about this web host, but InsaneGB.com sounded like a great deal. You can read their website for more details, but in a nutshell they got PHP 5, MySQL 4, and everything (Databases, Add-on domains, etc) is unlimited except disk space and bandwidth. They give you 5GB for disk space and 20GB on bandwidth per month. Which is great for a free host, if you ask me; heck, they even offer cron jobs.

Testing Their Setup

So I decided to give them a shot. I put up my personal blog on their server. In retrospect, maybe that wasn’t such a great idea, but I did it anyway. At first everything was great. Stuff was fast and everything was popping up instantly. There were some things that most would consider acceptable for a free host.

  • I couldn’t run any PHP ini_set commands

    So there’s no increasing running time for scripts. I guess I would live without that.

  • You can’t open/download any files from outside servers

    This I came across when trying to use some of my Wordpress plugins that automatically install plugins and automatically upgrade the Wordpress installation. Oh, well.

If you're new here, you may want to subscribe to my Full RSS feed. Thanks for visiting!



Published: Friday, November 30th, 2007

Prototype: Image by robdup

Before I start let me say that CakePHP is great. I love it to death. Currently, I’m coding a semester long class project for a friend. I’m trying to illustrate just how much faster it is to create a web application using CakePHP than anything else the other students are using.

The Project

The project consists of computerizing some department of the local university. What she’s chosen is to computerize the Audio Visual Department. Specifically the process of submitting equipment requests to the department so they can take the equipment to different classes.

The Competition

The other students are using things like C#, Visual Basic, and other high level programming languages. With all these things, you need to design an interface (and everything else for that matter) from scratch.

You’re also on your own when it comes to controls and binding them to the database fields. Not to mention, you need to do all the database relationships by yourself. The other problem is that the project is a multi-user application by definition. That means a central database. This is generally more difficult to implement on a desktop application. The project, to me, just screams Web App!



Published: Wednesday, November 21st, 2007

Oven Knob

Patty Cake, Patty Cake, Baker’s Man

One of the things that sold me on CakePHP is the bake routine. This is basically code generation for the lazy types like myself. It was good in CakePHP version 1.1, now it’s just awesome. The only way they can make it better is to implement a web version, but that’s another story.

What Baking Does

In CakePHP we refer to the automatic code generation as baking (get it now?). An entire application can be baked from nothing more than a few tables in a database. CakePHP uses some skeleton templates, which you can of course customize to your needs, to generate your Models, Views and Controllers. The controllers and views come with the standard CRUD (create, read, update, and delete) functions and can also contain admin functions.

Currently, we run the Bake routine from the command line. I’m hoping sooner or later this can change, but with a lot of hosts allowing shell access to your account, this isn’t a priority with the developers.



Published: Sunday, October 28th, 2007

Got The Cron

Web Cron is a great method of automating tasks on your server if you're not blessed with cron jobs. However, after writing this I stumbled onto something that may fit your needs a bit better; Remote Cron is that service. It's everything Web Cron is and more:

  • It's Totally Free
  • It's in English

What more can you ask for? Yeah, I know, my standards are really low.

Now On To The Backup

Previously, I used a script called backupDB for my MySQL PHP based backup solution. This package included a nice graphical management tool. It allowed you to pick different databases and different tables that you want to back up. It was also great for automated tasks also by calling it like this:

PHP:
  1. backupDB.php?StartBackup=complete&nohtml=1

And it is this system of passing parameters that makes this tool extremely flexible. Using parameters you could choose to backup all the databases on the server or just the one you specify. You could also specify individual tables that you would want to backup:

PHP:
  1. backupDB.php?onlyDB=dbname&StartBackup=complete&nohtml=1
  2.  
  3. backupDB.php?StartBackup=complete&SelectedTables[dbname]=tablename&SelectedTables[otherdb]=othertable&nohtml=1


Published: Saturday, October 13th, 2007

Clock

What To Do When You Can't Cron

One pet peeve that I have with 1and1 hosting was their lack of Cron Jobs. Cron Jobs are basically the Unix method of scheduling stuff, much like the Windows Task Scheduler. If you're on a Unix/Linux host, then they use cron jobs to schedule their internal activity. But not every host is kind enough to give you the same power to do so. Now that I'm on DreamHost, I don't have this problem anymore, but a lot of shared hosts still lock up the cron jobs. And since hosts like 1and1 aren't too reliable with their backups, doing your own backups becomes, more of less, essential. There are, of course, alternatives if your host doesn't provide you with cron jobs, such as phpJobScheduler (used this a lot back in the day) and pseudo-cron.

How The Other Guys Work

The way these work is that, they keep track of tasks and times every time the cron job is called, but you need to include them in one of your highly accessed pages (e.g. Home page). With phpJobScheduler, you can include the file in your PHP code, or you can include it using the img tag. Using the second (2nd) method spits back a transparent GIF of 1 pixel, so nothing will be displayed on your page and you could even use it within plain HTML pages if you needed to. When this is triggered, it checks the database for time of each task, compares that to the current time, them if x > y it runs the task. Simple really. Since they need to be triggered via a user visit, it's never going to be pin point accurate; this is why you need to include it on a page getting high traffic. Some of the scripts even have an option to build in to help with this. It's a sort of buffer time. This says that even if the specific start time of the task hasn't arrived yet, run it anyway if it's within the buffer amount. You would increase or decrease the buffer based on your anticipated traffic.

Popularity: 23%



Published: Monday, April 2nd, 2007

No, I'm not moving, not yet anyway. But Lava is. She scored a domain name which describes her blog so perfectly, that she couldn't help but nab it up: HowISaveMoney.net. Now what are the odds that this domain would still be lying around?

Lava finally made the big step and "moved into her own place". Moving domains is always such a hassle, but there are a few things that make the process a little bit easier. I was the Administrator during this move and I must say it was a little bit involved, but I think I got it done.

The Domain

The domain was purchase at 1and1.com. Why not NetSolutions, Yahoo, GoDaddy? Because they all have great promotional deals but then it's upward of $8 to renew every year. 1and1 has a nice flat rate of $5.99 every year.

The host remained the same, since this particular hosts allows up to 10 domains pointing to it. All the files are simply dumped in a different sub folder. I both love and hate the idea of one consolidated host. It's easier to manage: one login one set of administration and maintenance, cheaper than several different hosts. But if one sight goes down, they all go down. If a hacker gets into one, he damn well gets into all of them. The load on all of the sites is still very small and way under the allotted bandwidth limit. Most of them are blogs using Wordpress and we all know what a small physical footprint Wordpress leaves behind. If any one site seems to out grow things little family what it turns 18 or something, it will definitely be kicked out of the nest onto it's on hosting package.

Copy Files

Now this should be the simple part. You copy everything into the folder that is going to house your new blog. There are a few minor changes that you might need to make. Depending on your previous setup you may need to edit the .htaccess file and change the RewriteBase option. But I do think that Wordpress will configure it for you when you set up your permalink stuff.

One change that is necessary is editing your wp_config.php file. If you're changing databases, you need to make the changes here. If you're not changing databases you still need to make the changes to the table prefix. I forgot to mention that we still need to keep the old database active (details to come later).

Popularity: 21%