database

Comment Relish Plugin + High CPU Usage – Fixed The Right Way

How The Problem Started Christmas Eve have just started at about 12:03 AM, when I logged on and saw that dreaded message: Your Account Has Exceeded Its CPU Quota So I did what all normal people do at first: I ignored it. Actually, I had a very good reason to at the time. Since it was 12:03 AM, I assumed that my nightly backup job (backup and compress files and databases) was causing the issue.

Why My WordPress 2.7 Install “Failed”

Now, it’s no secret that I can be a moron sometimes, but I’d like to put it on record that it was all me and not WordPress 2.7 that had the issue. So I’m sitting here last night minding my own business and Chris Coyier sends out a tweet talking about how it took him 10 minutes to upgrade. So I figure, why not? I already had the WordPress Automatic Upgrade plugin ready to go, so I figured it would be a breeze.

A Bit On Open Source And Some Baz Background

This has always been a touchy subject, especially in larger computer firms. But first, let me tell you how I got into Open Source. I started coding in Turbo Pascal 7.0, in about 1996 when I was in Grammar School. I took Turbo Pascal more as an introduction to Programming, instead of a product to do something constructive in.

After Pascal, I was looking into something visual. Hence, I fell into Visual Basic 5.0. Yeah, I know, I’m sorry.

Now this was my first step towards the open source community. I must admit, that I downloaded a pirated copy and ran with it for a while. Now, that was all well and good when I was sitting home playing around with stuff. But when it came to actually, to producing something for a market, you can’t (or should I say, shouldn’t) do that with pirated software.

After that, I got into web development. For this, there was a plethora of free tools available, for use. So I did that for a while. When I got back to college, I got into C++ (using Visual Studio, but still essentially free). That was a step in the right direction. However, as the semesters went on, we got more into using the .NET library. However, for my web development I never got into ASP.

The First Real Plunge into Open Source - Enter PHP

Bit by bit, web development gave way to web programming. This is where PHP came in. I got more familiar with PHP when I started working on different projects for clients. I chose PHP for a few main reasons:

  1. Free Documentation: I could learn almost everything I needed through online documentation.
  2. Cost: My first problem was hosting. ASP hosts used to be almost twice as expensive as their Linux counterparts.

The Open Source Misconception

One of the problems that people have with Open Source is that they think that it’s unsupported. People seem to think that open source software is written by a bunch of kids in basements or something. This is not the case, by any means.  For example, a lot of the Linux distributions are totally free and totally supported.  Wake up people; free doesn’t mean unsupported. The whole “You get what you pay for” isn’t always true.

CakePHP Contact Form – Quick and Dirty

I must say, this was a major hurdle for me when I first started out with CakePHP. If you’re working with some data from a database, then it’s all Model-View-Controller magic. Your forms are automatic: $form->input() is pretty much all you need. Why is this? That’s because all the information about the fields (names, sizes, types, etc.) come straight from the database. You’re Out On Your Own The problem right now is that, you’re all on your own.

WordPress 2.5+ Upload Image Error – Finally Fixed!

I know I’ve mentioned it before, but I’ve had some problems with WordPress 2.5 and their new image upload. Now I know there have been many, many, many, (well let’s just say a lot) of posts and articles about how to fix this problem. But, none of them seemed to work for me. Most of them just go into the basics: setting folders with the right permissions, etc. My Set Up I won’t go into detail, but I think being on Dreamhost has something to do with it, because trying all this on my local PC with XAMPP Lite on Windows XP.

InsaneGB Review – Free Web Server 5GB Disk Space, 20GB Bandwidth

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.

Using CakePHP for A School Project – Proof of Concept

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.

CakePHP Bake – Baking Models, Controllers and Views the CakePHP 1.2 Way

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?

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.

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.