Importing Large Files into MySQL using phpMyAdmin and CPanel

When I need to upload large .sql file (greater than 10 MB) into MySQL using phpMyAdmin, it frequently times out.

The annoying the solution is to split the SQL file into several smaller file, but text editors will hang up if the file is too large, and if you aren’t careful you can break the whole script.

That is why I like David Pratt’s solution. It worked great.

1. If you have phpMyAdmin installed in CPanel, you need to login to your server using your root password. Navigation to the folder:


2. There, create a directory “upload”.

3. Next, look for config.php and change the line:

$cfg['UploadDir'] = '';


$cfg['UploadDir'] = 'upload';

4. Save the file, and upload your .sql script into that upload directory.

5. Now when you go to the import tab in your phpMyAdmin, you will have a new option under “File to Import”, called “Or web server upload directory”.

6. Select the file you uploaded from the drop down menu.

My Password Was Hacked

This past weekend, a major website was hacked, and all the emails and passwords were posted online for the world to see.

Luckily for you, it was a network of technical websites.  So if you aren’t a tech guy, you probably aren’t affected.

Unluckily for me, my personal email and password was one of the 1.5 million stolen.

Anyone of BILLIONS of people could have gained access to my:

1.  Amazon
2.  Ebay
3.  Godaddy
4.  Myspace

And could of:

1.  Logged into amazon and bought anything they wanted and shipped it across the world.
2.  Went into Godaddy and stole all my websites and deleted some of my family’s email addresses.
3.  Went into myspace and stolen my identity.

It could of been worse.  They could of had my password to my email, bank, or paypal.  Since I keep all my email online, a thief could of done some real damage.

And just think how many people of the 1.5 million were lawyers, business owners or tech guys that have a lot of sensitive client or company information in their email accounts.

Many of you take precautions every day to keep you, your business and your family safe:  you lock your doors, you don’t put your social security number on facebook, and you don’t throw away bank statements in the trash without shredding them.

Yet, every single friend, family member and client I have given computer help to is using the same password for most websites they visit.  Even after I mention that this isn’t smart, they agree and do nothing.

I have a master list of my passwords, and a decent password policy, so it was easy for me to see which sites shared my compromised password.  Had I not had that, I would not of known which sites I needed to change and probably would of really freaked out.

As it stands, it freaked me out enough to send this email to you.

Now, I am going to tell you what I do to protect myself, and not only is it easy, but it is actually EASIER THAN WHAT YOU ARE DOING NOW.

But first, I want to clear up a few points.

Three Password Justifications I Hear All The Time

1.  “I only use the same password for some sites – not the important ones.”

If any of the sites have your personal information, there is a danger.   If the thief can discover the last 4 of your credit card, or mother’s maiden name, they can use that to access other sites.  If they can get your phone #, they can fake texts, intercept messages and get your phone records.

2.  “No one is going to try to break into my account!”

You’re right, probably no one will.  But computer’s might.  If you use a word out of the dictionary as your password, or god forbid the three most common passwords, “password”, “qwerty”, or “123456”, someone can run a computer program and log into your account in under a second.

And as the news story above shows, they don’t even need to do that.  If any one of the thousands of sites you have an account on has been compromised, you could be a victim.

And the criminals may not be so foolish as to post it online.  I had time to make sure all my accounts weren’t compromised; most of you will have no warning and no indication anything is wrong.

3.  “I can’t remember 500 passwords”.

Hence my solution…

My Awesome 5 Minute Solution

(At this point, if you want me to just “fix it” for you, just contact me directly)

Obviously, no one can remember more than a half dozen passwords that need letters, numbers, uppercase, blah blah blah.  And writing them down on a sticky note stuck to your monitor is insecure in a whole different way.

Step one is to buy or download a free trial of 1Password ($39 for Mac, $29 for Windows).  Don’t install it yet.  (Use coupon:  “MacPowerUsers” for 20% off)

What is this for?

  1. It stores all your passwords in one safe, encrypted location.
  2. It takes a master password to open it, so even if a thief is sitting at your computer, they can’t see them.
  3. Using a real cool trick, all your passwords get backed up and sync’d online so you will never lose them.
  4. When you install it the way I tell you, your passwords will be available on your iPhone, iPad, any laptop or computer you use.
  5. It can help you generate passwords so you don’t have to spend time thinking of new ones.
  6. And most importantly: it will fill out every login form automatically for now on.

For example, when I go to facebook, I just have to click one button in my browser, and I am logged in.  I don’t have to type my email, password, nothing.  It just works.

(Some of you may have your browser save your password for you.  This saves time, but if you computer crashes you will lose it, and if someone else uses your computer, they can see it and access your accounts.)

Step 2: In order to take full advantage of everything I am telling you here, you also have to download and INSTALL the free program, Dropbox.

This is an awesome program in it’s own right.

Dropbox gives you a “folder” or “box” that sits on your desktop (just like any other folder you fill with documents, images, music, etc), that you can “drop” files into.

Those files then get automatically transferred to the internet.  Additionally, you can install Dropbox on other computers, iPhones, etc, and each device automatically see’s every file the instant you put it in the “box”.

Dropbox has the added benefit that if your computer ever stops working, all the files in your Dropbox are safe and automatically downloaded back to your computer when you reinstall it.

Once you install Dropbox, you will tell 1Password to store all it’s passwords in there.  Therefore, all your passwords are backed up immediately, and can be accessed from any of your devices.  That is POWERFUL!

To sign up and download Dropbox, click this link.  It is a special link from me, so if you signup, we will both be rewarded with an extra 250 MB of space for life:

Step 3 is to install whichever version of 1Password you downloaded.  As you install it, it will ask for your Dropbox information.

Step 4 is to just follow the install screens and allow it to install plugins for Internet Explorer, Firefox or whatever browser you are using.

That should be it.  Now the next time you type in a password, 1Password will prompt automatically save it.  And once you are comfortable with the program, you can start changing your passwords for each website.

Step 5  Help your friends and family

I originally sent this as an email to my friends and family.   If you know of anyone that might also be at risk, please have them read this – ESPECIALLY if you have ever sent them any personal information using email.

Switching to the Mac: Buying a Mac

Almost 10 months ago, I purchased my first Mac. Because a lot more of my website work was less Microsoft and more Open Source, it made more sense. I also wanted to learn iPhone / iPad development which is impossible without a Mac.

For an employed Windows developer, it was scary, confusing and exhilarating. There were so many questions swimming in my head:

Was I going to be able to perform my normal job?
Would it take long to learn OS X?
Would I have to purchase a lot of software?
Would I like it?
Am I throwing my money away?

By far, the biggest problem was the money. Everyone knows that Mac’s are expensive, and I wasn’t willing to spend $3,000 on a device I may land out hating.

Step 1: Programs, Files, Mail

The first step was to figure out how I would move my files, mail and programs to the Mac, if i was able to find one. This is what I found:

  1. All my regular files could be backed up and easily transferred.  The Mac can read standard Windows NTFS drives, and read and write to old FAT32 drives.
  2. I migrated all my email to a Google Apps account, so all my email was in the cloud and didn’t have to be transferred directly. This was a HUGE time saver.  I followed Scott Hanselman’s advice on how to move my email without losing mail.
  3. I called Adobe and made sure I could transfer my Photoshop license to the Mac.
  4. Lastly, I went through every program I use, and found replacements for the Mac.

Step 2: Finding the Right Mac

As a developer, I need a more beefy machine than the average computer user. I had grown accustomed to a 17″ laptop, but because this was an experiment, I wasn’t going to spend money on that. I had to have a laptop, so that eliminated the iMac’s and the lower end Macbook.

So, I definitely needed a Macbook Pro, but couldn’t afford to purchase one new.

I went to and started using this query to find what I needed:

In short, it is looking in Los Angeles for a Macbook Pro, but asking it to not return any listings that mention “13.3”, “13”, “wanted”, “air”, “hp”, “jbl”, “trade” and “white”. I also specified to only see listings between $600 and $1400.  This narrowed the results down enough for me to look through every day. I added it to my Google Reader so that I would receive notifications the instant one appeared.

In under a week, I found a listing for a late 2008 model, just prior to the current Unibody model, with software and Applecare warranty for $1,000.  I called and offered to come over immediately with $900 cash and he agreed. He was suprised I was willing to do this at 8 pm at night, but I knew if this mac wasn’t “too good to be true”, I would lose it by the next day.

Step 3:  Buying A Used Mac

I didn’t know how to figure out if I was buying a good machine or not.  I didn’t even know how to login to a Mac, or how to look at the processor.  Luckily the seller’s roommate was able to answer my questions.

The main place to look was in “About This Mac” which you access by clicking the Apple logo located in the upper left of the screen.  This showed me the processor and memory, and then when I clicked “More Info…”, I found the Battery Cycle Count which told me how many times it had been charged.  This number was ridiculously low, confirming the story that he never used the laptop.

He also said he had purchased a 3 year warranty from Apple, but I couldn’t confirm that there.  I had his address, so I decided to buy it and go to the Apple store the next day, which did confirm the warranty.

Lastly, the Mac came with a hard cover ($60 – $80), a bag, and software discs of Microsoft Office and Final Cut Pro.  I found that many used Mac ads claim that it comes with lots of commercial software, but they rarely come with the discs – usually meaning that they are pirated.  Having the original discs with license keys proved to me they were original.

I sold Final Cut Pro on eBay for about $150, which I used to upgrade the RAM from 2 gigs to 4, and allowed me to purchase some additional software.

With everything out the door, I got a 1 year old Macbook Pro with 2.5 Ghz Core 2 Duo with 4 Gigs of RAM, Microsoft Office, Bag, Case and a 2 year Applecare Warranty for about $800.

It IS possible to buy a solid Macbook Pro for under $1,000 – I did it. You just have to have your wits about you and be aware of anything that smells shady. In my case, I got the seller talking and learned that he received the Macbook for the Film School he paid a lot of tuition to attend. He soon learned he didn’t want to be a Film Maker, and therefore never used the Mac.

In the next part of Switching to the Mac, I will discuss learning OS X and the software I decided to buy.

Integrating Forums with WordPress

There are three viable options if you want to leverage WordPress as your Content Management System, yet want to offer your users a way to interact in a forum.

  • bbPress
  • phpbb
  • vBulletin


bbPress logo
bbPress is a very lean forum solution for WordPress written by Automatic.  It is a great idea for a quick and dirty forum that works.  Theming works similarly to WordPress – so if you enjoy writing themes in WordPress, this will be easy.

I had to install it in a subdirectory. Trying to install it in the same directory as WordPress causes a battle over index.php since they both need it.

For the most part, you just need to install it, and follow the directions. Here are my tips:

  1. Make sure bb-config.php is writeable.  I didn’t find that out I needed to until I got an error message.
  2. When it is asking you for the “salt” strings, you can go here to view it if needed: /wp-admin/options.php
  3. I didnt read this until after my first attempt, but by following this you should be fine:


Latest Discussion For WordPress – This will allow you to see the forum posts in your wordpress sidebar


If you can’t get to the bbPress Admin Site after integration, just delete the following keys in your bbPress database that refer to the WordPress database.


After spending several hours trying to figure out how I broke the bbPress Admin Site, I gave up and just installed bbPress into the WordPress database.


phpBB logo
phpBB is a much more robust (bloated) forum.  And the integration is done with one major plugin, WP-United.

You must follow directions exactly.  There are about 30 files you need to edit, and if you zone out and start watching ESPN, it isn’t going to end happy for you.

There are over 20 code changes you need to make in the phpBB files, and the instructions sometimes say “replace”, “add before” and “add after”.  It is easy to overlook these and add your code after a line instead of before.

Once it is installed, you can use various Template Tags in your WordPress theme to show forum posts and statistics.

Theming is also really nice – there are files you can edit just like bbPress.  You just need to learn some of the phpBB conventions they use in the HTML.


  • I couldn’t get the logged in user to show logged in under comments.
  • Basic features like adding users by an administrator requires an additional plugin.
  • If you have to upgrade phpBB in the future, you will have to make all those edits all over again.


vBulletin logo
vBulletin is extremely robust, but so much so that it is really hard to figure out where to configure various settings.  But because of the large user community, a simple google or vBulletin forum search will tell you where to look.

vBulletin is not free like phpBB or bbPress, but you do get what you pay for.  You get free Technical Support, and for a little more money you can even get free telephone support.

You can view an online demo on their site before you purchase, and if you buy it and change your mind, you can get your money back within 30 days.

The major benefit with vBulletin is that it opens the door for you to start charging for paid membership.  vBulletin integrates with many payment providers and can charge one time or recurring.


vBulletin-Wordpress Bridge:  This will map vBulletin user groups to WordPress user groups and allow single sign on.  Just make sure you follow the instructions and go to fast.  (Do the test post before you go and turn it on all the way.)

Simple vB Login – This gives us our login form on the WordPress side.

If you want to access the vBulletin user, you need to put “global $vbulletin;” in the login_inc.php and possibly the header.php of your theme.

Hidepost (custom) – The normal Hidepost plugin allows you to hide content from various user groups.  I changed hidepost to look at $vbulletin user instead of wordpress user (although you may not always have to do that).


  • Logging into vBulletin is confusing.  You can login at, but all your user information is on  And then you have to add an email address to your account to access where the user community and mods are located.


  • If you think a forum would be nice, but you don’t know if it will be successful or not, go with bbPress.
  • If you want a full featured forum, no matter how complex, go with vBulletin.
  • If you think you would EVER want to have a paid membership with hidden content, you must use vBulletin.
  • If you like the idea that you can email or call someone for help, use vBulletin.
  • If you like the features of vBulletin, but you REALLY don’t want to spend the money, then go with phpBB.

Stephen Colbert Said My Name On The Colbert Report

Not sure how long the link will stay live but you can see it at the 5:30 mark over at Hulu:

I signed up for the beta of which he was making fun of.  It is a site that allows you to share your credit card purchases.

You can view my boring purchases here.


How To Cheat at Mafia Wars

More truthfully, this is  “How to Take Maximum advantage of the rules in Mafia Wars”.

If you play correctly, you can get to a point where you will never run out of energy.  You can just level up over and over and over.

Today I played for just a little while and completed over 4,800 jobs:

Mafia Wars Profile Page

This is what you need to do:

  1. If you haven’t started yet, choose the Maniac mafia type.  This isn’t required, but just makes the game go faster.
  2. Find a Mafia Wars group to find people that will join your mafia.  Send them friend requests and start to fill up your mafia with the highest level guys.  The two most important slots to fill in your Top Mafia is your Mastermind and Wheelman.  I made sure I filled them with guys that gave me an 11% reduction each:
    Mafia Wars Mastermind
    This gives me a collective 22% bonus for all my jobs – HUGE.

    For your Mastermind, you are looking for someone that has completed a lot of jobs, and for your Wheelman you are looking for a high level Fearless mafia type.

    My Mastermind has completed 27,500 jobs, and my Wheelman is Level 358.  These are high numbers, but relatively easy to find.

  3. Add every skill point to your Energy as you aquire them.
  4. Whenever you can, spend 14 Godfather points to receive 4 additional Skill points, and add them to your Energy.

It won’t happen right away, but eventually, you will have so many Energy points that you will never run out.  I was able to complete all of Cuba in one sitting, along with most of the Boss level.

Once you have completed all jobs, there is no end (at least so far).  You can complete the best paying job, “Settle a Beef…Permanently” forever. I levelled about 100 times today alone.
And just to show you how cool it is, I completed jobs for the same amount of time it took me to write all this up (about 10 minutes). This was where I started:

Mafia Wars Jobs

And after 10 minutes:

Mafia Wars Jobs

It would take a normal player well over a week to complete 30 levels!

Every “trick” has a down side, but in this case I don’t think it is a big deal. Because you are spending all your skill points in Energy, you will be very weak and get robbed and killed more often. But since there are no real penalties, this is a small price to pay.