Fixing the PHP Allowed Memory Size Exchausted Fatal Error in WordPress

When I logged on to post an update today, I was greeted with the error message:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 208834 bytes) in /public_html/*
(where * represented the path to any file in the wp-admin portion of one of my blogs). The content/end-user portion of the blogs were showing up just fine, I just couldn’t write any new content or make changes.

My initial research said that I would need to get my hosting company to increase the memory allocation of PHP on the server, or add the line ini_set("memory_limit","16M"); to any offending .php file. Since my hosting company is takes days to get to any problems, and I was having this issue with every .php file in the /wp-admin/ directory, these seemed like non-solutions. When I came across the idea of adding php_value memory_limit 32000000 to my .htaccess file, my hopes of a quick fix were restored. I added the line to the .htaccess file in the root of my website (/public_html) and the problem disappeared instantly, for all of my blogs hosted on this server. Hurray for quick, easy fixes!

converting video

This weekend my wife asked me to help her put together some videos for her cooking website. Since I was playing with Adobe Premiere Elements anyways, I thought it would be no problem at all. My outlook changed once she gave me all of the source videos – they were all in DiVX or flash (.FLV) format, and Premiere refused to open them. So I started searching for utilities to convert these files to something Premiere would open.

An hour later I had a bunch of installers on my desktop, but nothing that worked well, or quickly. I decided to give VLC a try. I like VLC as it’s free, opens anything I throw at it, and with the portable version, I always have it available to use wherever I go. When opening a file, stream or disc, you can pick the “stream output” option. I usually save the files as QuickTime .mov files. Here is what the settings window looks like:


Here’s what each of them means:

  • Target – ignore this box – VLC will fill it in for you as you make settings in the fields below. If you can fill this box in by hand, you are just one step away from dreaming in binary.
  • Play locally – plays the video as you convert it. Checking this box will allow you to see/hear what’s going on. Unchecking it will make the conversion go MUCH faster.
  • File – the location of the file you want to save to. Unless you’re overwriting an existing file, you’ll need to make one up.
  • Encapsulation method – the type of file you are saving to. Best results come from matching this with the related video & audio codecs below
  • Video/Audio codec – the software & algorithm used to compress the audio/video to make it take up less space.

I rarely have to change these settings, but if you’re having an audio problem, you may try changing the audio codec setting.

All of my wife’s files converted flawlessly with VLC, and now I’ve got to figure out all of the differences between Premiere Pro 1.0, which I’ve used at work and Premiere Elements 4.0 that I just installed. With any luck the cooking videos will be done by the end of the week.

TestOut vs. Examsaver – a tale of two CBTs

So I’m in the process of preparing to take my A+ exams (along with one of my employees as kind of a buddy challenge) and my MCSE, as we’re ready to wave goodbye to NetWare. Trying to squeeze both in at once has been a bit of a challenge, so I thought I’d look through my “Recent Pitches” folder for Computer Based Training. The most likely looking candidate was TestOut. After checking out their demos (IE only – they don’t work in Firefox) I was fairly impressed. Their presentation wasn’t going to win an Oscar award anytime soon, but it seemed to cover the material throughly and effectively. They seem to have a perpetual ‘special‘ where you can get 9 certification suites for $2K, which is what I got. Once my order arrived, I took the CDs out of the case and started installing them on my computer. My first shock was that after installing the MSCE and the A+, my (already maxed) hard drive was full – after re-starting on another drive I found the full suite takes up about 15GB of space. I guess that’s not bad considering that each unit has numerous video tutorials, and in hindsight is an indicator that the content is complete. I’ve now slogged through the A+ materials and am working through the materials for MS Exam 70-290. After a couple of hours of watching their video presenters I do have a mild urge to throttle them – although I have felt the same about 1/2 of the classroom instructors I’ve had. What I’m most impressed with is their LabSim software. It basically emulates the base OS you’re working on and lets you complete tasks in them. Their test exams seem a little lightweight, but I guess I won’t be able to say for sure until I hit the testing center.

A few days after starting with TestOut, I got a phone call from the folks at ExamSavers. They had a pitch for their entire
suite (17 vendors) in a “Platinum Edition” offering free lifetime updates for a small fraction of the $3K list price on their website. I negotiated a bit with them on the phone and told them I’d think about it. That’s when the high-pressure sales tactics kicked in. The offer was good for “today only”, and wouldn’t be offered again. I politely declined, but was given an ‘extra day’ to think it over. After reading some mixed reviews I decided to give it a try for two reasons: First, you got a book as training material for each exam – and sometimes I just prefer reading over watching a video. Second, the actual testing part was supposed to be strong, adaptively focusing the tests on sections you did poorly in. Third, the practice tests on audio CD sounded like a great way to sneak in extra prep time during my daily commute. It sounded like a good supplement to the TestOut materials I already had. The only thing I really didn’t like about it was the provision for getting two tests worth of training materials at a time – you have to send a copy of your test results to get the next set of materials. After getting the first test (MS70-290) from them, I’m fairly underwhelmed. The book is OK, the audio CD is just as expected, but the testing software is… lacking.  It doesn’t seem adaptive to me at all – I kept getting the same questions over and over again – even when I keet answering them correctly.  In hindsight I wouldn’t purchase it again – and I can see where the people who bought it as their only study resource could be frustrated.

I can see why TestOut has demos and ExamSavers don’t.  I could also recommend  TestOut, but because of their demo I don’t need to  – you can find for yourself.

November ’07 earnings report

Well it’s that time again, so here are my November 2007 income results. This month the sites pulled in $120.95, a nice increase over last month. Here is the breakdown by income stream:
Adsense: $39.64
eBook Sales: $19.94
Amazon Affiliate: $1.92
CJ Affiliates: $0.
WidgetBucks: $2.87
eBay sales: $56.67

Adsense climbed nicely, from an average of $1.10/day last month to $1.32/day this month. I’d obviously like to see a sharper increase, but at least I’m moving in the right direction! I’m a bit mixed about including the eBay sales in the stats, but my partner (the beautiful and intelligent Mrs. Schmitz) thinks they belong there and she’s always right, so who am I to argue? ;)

Like I said last month, I’ve been working on some additional sites, and if I can keep to my posting schedule, I ought to have a good amount of content on them by the 1st of the year and be able to start to monetize them. We’ll see if I can keep my nose to the grindstone during the busy Christmas season.

Enabling add-ons with Firefox beta

Firefox has released 3.0b1 and I’ve been eagerly awaiting a version that leaked less memory than a sieve, so I thought I’d give it a go. After downloading it, I was very impressed with it’s performance and styling updates. What didn’t impress me was the lack of add-ons. I mean, how can I possibly live without having my adsense earnings showing 24X7, or have access to skip bad tracks in iTunes from my browser? In all seriousness, losing some of the add-ons like the web developer or colorzilla are like coding with one hand tied behid my back.

Are we doomed to choose between memory leaks and features? Some may say yes, but I say “maybe not”. There are two different ways to trick your add-ons into thinking they are compatible with newer versions of Firefox. Be forewarned, though – doing so can seriously reduce the stability of Firefox. But, hey – you’re running beta software, right? You’re the kind of person who’s not afraid to take a little risk. So here goes:

Method 1 – editing the .xpi file:

Firefox add-ons are bundled up in .xpi files that are nothing more than zipped archives containing the necessary files. Add a “.zip” to the end of them and you can extract their contents for a little magic. Once you have the contents extracted, open the INSTALL.RDF file with a text editor. Look for the section that says
“<em:maxVersion>2.0.0</em:maxVersion>” change the 2.0.0 to 3.0.0, or even better 5.0.0. re-zip up the file and change the file extension to be just .xpi (no .zip). You can then open the file with Firefox and install it. Voila! Working plug-in. Now some new fancy plugins (like the Google Search Toolbar) are digitally signed, and making these changes somehow breaks the voodoo that holds them together. Firefox will refuse to install them, which is probably not a bad thing with all the crappy malware out there these days trying to get a piece of oyur computer. In a worst case, you can try…

Method 2 – using the Nightly Tester Tools add-on:

Install the add-on before updating to 3.x (or after, it just adds to the number of restarts needed). Once you’ve completed the upgrade, go to your add-ons manager (Tools | Add Ons). You can then right click on the add-on you want to test and pick “make compatible“. I’d recommend doing just a couple at a time, as about 1/3 of the add-ons I tried completely b0rked 3.0. If you run into this problem simply re-start in FF 2.x, and disable the offending add-on(s) from the add-ons manager. Later, rinse and repeat until you have a lustrous set of working add-ons.

I usually do a combination of the two – editing the .xpi file of all that I can, and using the Nightly Tester Tool to get the few that wouldn’t work that way. Either way, after you spend a day and a half getting everything working just right, the add-on coders will get off of their lazy duffs and eventually get a version out that works with the new beta. But you’ll have the satisfaction that you were able to run your favorite add-on before anyone else.

wireless meets SD storage in the Eye-Fi

Eye-Fi cardI believe the perfect gadget has just been released in the Eye-Fi wireless SD memory card.

This amazing little gadget combines a 2GB flash memory SD card and a full-blown Wi-Fi adapter into one tiny bundle. With this bad boy in your camera, you can take pictures and wirelessly upload them to your computer or one of a bazillion web hosting sites (like Flickr, Facebook, Vox, Picasa, etc.

With them selling for under $100, I just may need to get two. Grandma and Grandpa may just get one for Christmas. The time saved in not having to be the camera jockey every time someone in my family fills up a memory card could be priceless.

Fun with snakes

This week the drain started flowing slower and slower again. So I got out my handy dandy snake and got to work. I know that snaking out your own drains is way cheaper than hiring Mr. Plumber Buttcrack out to do the job. My sewer snake cost about $30 – which is a fraction of the cost of just getting a plumber out to your house.

After locating the cleaning access (and making sure no one started the dishwasher on me) I go ready to get to business.

The snake (or auger) that I use for cleaning my septic lines is a bit bigger than what you might use for cleaning the bathroom sink. It has a large, pointy head for breaking through those hard to clear rubber duckies.

Cleaning the clog is as easy as unrolling the snake into the pipe and using a little elbow grease to bash through any clots you might hit. A firm in and out motion usually does the job for me. I used my elbow grease to break up some pretty hefty grease clots in the line.


As you can see, the line gets pretty grunky during the cleaning. My clog is mostly grease, but I’m not sure I want to know what else is on there…..

Once you’ve broken through the clog, the drains should flow smoothly again. If your snake is made out of metal ,like mine, it’s very important to clean and oil it before you put it away, so it doesn’t rust. I simply wipe the snake clean with a paper towel and then wipe it with an oil covered paper towel. I use 3-in-1 oil, cause that’s what I had laying around. WD-40 or just about any other oil would work just as well.

Stupidity Shield – how to keep from clicking on your own AdSense ads

Like most aspiring dot-com moguls, I am fairly dependent on staying in Google’s good graces.  I’ve got $122.72 in my AdSense account right now, waiting for the next payout.  If I manage to get my AdSense account suspended or banned, I won’t see a penny of it – ever.  Since I try hard to keep my sites well within the AdSense policies, the only way I’d get into trouble is if I get click bombed or I accidentally click on my own ads.  There is some software you can use to prevent a click-bombing, but the most effective thing you can do if it happens to you is report it to Google and pray. A lot.

Preventing accidental clicks on your own ads is a lot  easier.  I use a script (originally written by Michael Hampton) that works with Greasemonkey (and Firefox, as there is no IE version) that prevents any clicks on ads with your unique publisher ID.

Here are some step by step instructions:

  1. Install Firefox if you already haven’t done so. You can download it from getfirefox.com
  2. InstallGreasemonkey by going here. Click on the “Install Now” button.  You’ll need to restart Firefox to complete the installation.
  3. Get your AdSense Publisher ID – it will look like PUB-1234567. It will be in the code Google has you post into your blog or website.
  4. Install the script by clicking here. Enter your Publisher ID when it asks for it.
  5. You can test your setup by clicking on the “Ads by Google” link above your AdSense ads. If everything is set up right, those clicks won’t work (won’t take you to the AdSense website).  Clicking on that link on someone else’s site still should.
  6. Profit! Enjoy raking in those six-figure checks.

October 2007 – best month to date

As October is officially over, I thought I’d share my October 2007 income results. This month the sites pulled in $80.13, almost 30% more than the previous high month (August 2007 @ $49.05). Here is the breakdown by income stream:

Adsense: $34.21
eBook Sales: $44.87
Amazon Affiliate: $0.
CJ Affiliates: $0.
WidgetBucks: $1.05

All time highs for both Adsense and eBooks. I think Jenny McCarthy’s media blitz really helped the eBook sales and traffic to the Autism/gluten-free cooking site considerably. I’m happy to say I finally have a month where I made over $1/day with AdSense, a goal I set for the 2nd month of CuteBabyFix.com being online – it’s six months late, but at least I finally made it.

WidgetBucks is a new advertiser that I started with about 1/2 way through October. I already have $1.52 for Nov, and hope to see steady increases as the months go on. If so, it will be my 1st decent profit on an affiliate program so far. I have made NOTHING through Commission Junction despite averaging over 30K ad impressions per month. I thought I had some great product placement in October, however I only had a click through rate of 0.22% and no conversions… pathetic! Hopefully WidgetBucks’ run-in with Google won’t come back to bite me in the butt!

Other October highlights include PageRank promotions of both CuteBabyFix.com and Woggle-Bug.com to 3 (from 1 and 2 respectively). I’m pretty jazzed about that, especially since many blogs took a huge PR hit this update. We continued to see a slow steady trickle of traffic from being posting on National Review’s Corner Blog, although nothing like the 3K hits we got in 2 days at the end of September. I think it helped bring our average RSS reader count up to 18. Finally, we hit the magic $100 number in our adsense account, so we’ll be getting a nice Christmas bonus from Google in December.

The most interesting observation is that I’ve had my best financial month ever, yet my traffic either stayed flat or dropped (depending on the site). I think there were two main things that brought that about. First, the Jenny McCarthy thing really drove more targeted traffic to Woggle-Bug. People were really looking for what we had and the cookbook eBook sales reflect it. Second, I dropped about 1/3 of my competitive ad filter from my AdSense settings. I got a lot more $0.01 clicks, but also a lot more clicks overall, boosting my total revenue for AdSense. This month I’ll weed through the rest of the list and see if the trend continues. I’m definitely skeptical of blocking the low-paying clicks after October’s income improvement.

Future plans: With my next major goal being $300/month, I’m hoping to make math work in my favor :) . With two active sites (I really haven’t monetized this one much) making an average of $1.36 a day, I’ll need 18 sites to hit the $300/month goal. Assuming we can keep performance like October’s going, I could do it with 7 sites. My goal for November is to get two more sites up and running, and post more regularly to this one (so I can monetize it as well). The new sites will be a Mormon Clip Art site (which I’m seeing fairly low CPM ads for so far, but I’m hopeful to find other revenue streams) and the re-birth of our Removing Cat Pee site (which I lost in a bad server crash). I may also try my hand at another couple of eBooks, as we’re having some great success with the Gluten Free Cookbooks. I know it will take a while to get the sites fully populated with content and making decent money, but getting the structure in place will be the first step!

Selling Books for fun and profit

So, you have some books laying around? Think selling them online could make you come cash and clear out some space? It’s definitely a possibility, but where should you sell them? There are five major options for the amateur bookseller: Half.com, Amazon, eBay, ABE and Alibris. All five have their strengths and weaknesses, but my biggest concern when looking at selling my extra books was the cost. Seller’s fees, shipping, etc. can take a toll on the bottom line. So I set out to see who has the most seller-friendly pricing structure. This what I came up with:

Selling Profit at:    
Price Half.com Amazon Ebay Alibris* ABE**
$5.00 $4.21 $2.79 $0.74 -$0.16 $0.23
$25.00 $21.21 $19.79 $19.99 $15.84 $17.53
$55.00 $48.36 $45.29 $49.02 $39.84 $43.48
$125.00 $112.46 $104.79 $116.69 $95.84 $104.03
$300.00 $277.46 $253.54 $286.00 $235.84 $255.40
$1,000.00 $949.96 $848.54 $963.25 $795.84 $860.90
* $19 annual fee divided into a hypothetical 300 books a year, with a $1/book charge for ‘basic’ plan
** $25 monthy fee divided into a hypothetical 25 books

Read More »