Skip to content


Automate MySQL Database Backup With WebCron - No Cron Jobs? No Problem - Part 2

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:

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:

backupDB.php?onlyDB=dbname&StartBackup=complete&nohtml=1

backupDB.php?StartBackup=complete&SelectedTables[dbname]=tablename&SelectedTables[otherdb]=othertable&nohtml=1

If you so desired you could even sustibute StartBackup=standard for StartBackup=complete so that you don’t have complete insert statements (they don’t include all the column/field definitions). Depending on the size of your database, this may dramatically reduce the size of the backup file.

Posted in General.

Tagged with , , , , .


See How Easily You Can Increase Page Load Time 10 Fold With jQuery

Introduction

It’s no new news to us that images hurt a page’s load time worst then anything out there. There are a lot of things you can do to try and alleviate some of the problem. You can use smaler images, you can reduce the quality on images, etc.

But consider this. You know that your website is going to a long one. Meaning that the user is going to have to scroll. This means that they don’t see the entire page when they first load. Wouldn’t it be nice to only load what they need? You could load only the images that are in view. This will give the user time to read the content about the fold on your page, then as he scrolls down, you can gradually load the rest of the images.

This is referred to as Lazy Loading. It’s exactly the opposite of preloading images. We preload images for a lot of reasons. The classic example is in those old school JavaScript (and even CSS) rollovers, where we preload the rollover image so that there is no delay when they are needed.

Enter Lazy Load Plugin for jQuery

Lazyloader is inspired by YUI ImageLoader Utility by Matt Mlinac. It simply delays the loading of images on the web page until they are within view. This gives the page quicker initial load time.

This works out great if you have a page with a lot of heavy images lower down and a lot of navigation links at the top. If the user is trying to get to a specific page using this plugin would be a great help.

Posted in General.


I Think I Owe IE 6 An Apology, Nah.

I had some downtime tonight (well not really, but I figure that was a good form of procrastination) so I decided to take a quick look into my blog and see what the issue was with Internet Explorer 6.0 and my sidebar.

It turns out, as you may already know, that I’m an idiot. It wasn’t totally the browser’s fault. I was migrating (patching heavily) this theme from a dynamic/fluid width to a fixed width and I made a dumb mistake. I wouldn’t call it a mistake, but rather something that should have been avoided, knowing how finicky IE is.

I left all my widths for content and the sidebar as percentages instead of converting them to fixed pixels. Thinking about it now, I don’t understand why it doesn’t work in IE, but learning Internet Explorer 6.0 CSS rules is like learning to speak Klingon : You probably could if you really wanted to, but what’s the point?

I also failed to mention that I had an Adsense unit at the bottom for which I forgot to do a clear: both.

Posted in General.


I Hate Internet Explorer 6.0 Even More

After all the trouble I went through making sure my theme works in Internet Explorer 7, you’d think that would be all right? Nope.

Last night I had some problems trying to get Ubuntu on my computer. One of the steps involved restoring a previous disk image I had on when I just installed Windows XP. I usually back things up and restore this image every few months. It’s bare, clean and very fast. All that’s included are drivers, 7-Zip, Notepad++, Firefox and Internet Explorer 6.0.

I wanted to check the position of some new ad blocks I put up on the site, so I pulled it up in Internet Explorer 6. To my dismay, but no surprise, my theme looked horrible; the sidebar was all pushed way down on the right.

What can you do at this point? I just sighed and forgot about it.

So I’ll take this time to apologize to the 6.3714% of my visitors that are cursed with Internet Explorer 6.0. I’ll try to fix it when/if I get some downtime.

Posted in General.

Tagged with , , .


Automate MySQL Database Backup With WebCron - No Cron Jobs? No Problem - Part 1

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.

Posted in General.

Tagged with , , , , , .


Hardware Fax Solutions

Faxing is something you don’t really hear many people talking about these days. Now do you really blame them? With the advent of email, what’s really the point, right? But there’s a hybrid: there are high tech businesses that live in a world of fiber optics and T1 lines, but they also need to send and receive faxes. Are they really going to just stick a phone line in there, and slap an old school fax machine on there?

No, they’re going to hook up a Fax Server and use a Fax Over IP solution for their business. This allows something that allows unlimited users, integrates with Outlook and much more. Yeah at $4,800 a pop for the VOIP version, it’s a bit steep, but just think of sending several thousand faxes a month over a phone line.

It’s a brave new world; nice to see Fax Software stepping into the light.

Sponsored Post

Posted in Sponsored Post.


Finally We’ve Moved To DreamHost - Quality Web Hosting

MovingThis has been a long time in the making, but I’ve finally decided to move this blog (and a few other things I’m hosting) to DreamHost. Why DreamHost? Because they offer a great package, what can I say? I’ve been hosting at 1and1 for over a year, but after a few bad experiences, I’ve decided to move to something a bit more robust.

Although it’s not really fair to compare DreamHost to 1and1 Hosting, let’s give it a shot:

Cron Jobs

I use these for my MySQL backups. Download a nice PHP script and set up a cron job to run said script at a scheduled time. Without cron jobs, I have to go through the hoopla of running some PsuedoCron stuff, which basically runs a script if a user visits your website after the script has been scheduled to run. This is fine for small scripts, but didn’t really fly much for my database backups, since the poor sap that happened to trigger the script would have to sit and wait for it’s completion, as it would appear to be something the website was loading.

Ruby On Rails

After working so much with CakePHP, I can’t help but be curious. I really doubt that I’m going to jump ship, but it’s good to have an environment to play with.

Space and Bandwidth

You got 500 GB of disk space to play with, and 5.0 TB of monthly bandwidth. This is enough to host at least a few good sized sites under one account. The unlimited Domains makes this a breeze.

Posted in General, MySQL.


Web Development 2.0 Carnival - September 24, 2007

Welcome to the September 24, 2007 edition of web development 2.0.

Madeleine Begun Kane presents Ode To The Mobile Web (Cell Phone Browsing Humor) posted at Mad Kane’s Humor Blog.

General

Paul presents Make Web Site Development Easy posted at BigTechnical, saying, “Great CSS tools and more.” Although I don’t really dig the Blueprint CSS framework, the tips on Nifty Corners and gradients are good.

Don Albrecht presents Why Are CSS Frameworks Important to AJAX Development posted at Ajax Bestiary, saying, “It’s way to easy to get burned in AJAX development when you don’t start with a good foundation. Here’s an exploration of why CSS Frameworks can give your entire development process a leg up. Even the javascript.” Again, I’m not a fan of CSS frameworks, but to each his own.

John W. Furst presents Use Safe Identifiers In Your Web Templates posted at E-Biz Booster Blog, saying, “I wrote this, because I was getting tired of looking up the specifics in different specs all the time. You might find it to be a helpful resource for your readers.”

Posted in General.