Friday, October 22, 2010

Show all NVRAM Settings in Tomato

1. Log onto the router
2. Go to Tools > System
3. In the textbox type nvram show
4. Click Execute button
5. Should see results similar to below:


For NTP Update on Tomato

1. Log onto the router
2. Go to Tools > System
3. Type ntpc in the text box. If U.S. based you can use ntpc
4. Click Execute button
5. Should see results similar to below:

Trying []:

Time: Sat, 23 Oct 2010 00:53:23 +0000, no change was needed.

Tuesday, July 6, 2010

Send MySQL Backup thru Google Apps Email using PHP

This post combines items that were gathered from a few sites. The problem we were trying to solve is emailing a MySQL database backup using PHP PEAR through Google Apps. This script could also be easily modified to send through gmail. The file includes some hints and links to assist you whenever/wherever possible. Thank you Peter for providing the starting point for this script.

// enhanced from original provided @

// install the following pear modules
// pear install mail_mime
// pear install mail
// pear install net_smtp

// see this entry for more information about pear mail

// mysql database connection information
$dbhost = "localhost"; // usually localhost
$dbuser = "mydbuser";
$dbpass = "mydbpass";
$dbname = "mydbname";

// create the mysql backup file
$backupfile = $dbname . "_" . date("Y_m_d") . '.sql';
system("mysqldump -h $dbhost -u $dbuser -p$dbpass $dbname > $backupfile");

// includes

// smtp settings
$params["host"] = "";
$params["port"] = "587";
$params["auth"] = true;
$params["username"] = "";
$params["password"] = "mypassword";

// email settings
$cr = "\n";
$recipients[] = "Recipient 1 ";
$recipients[] = "Recipient 2 ";
$sendfrom = "sender ";
$sendsubject = "Backup - MySQL -";
$text = "Database backup performed on " . date("m/d/Y @ H:i:s", time()) . $cr;
$text .= "File name: " . $backupfile;

// *************************************
// do not edit below this line
// *************************************

$message = new Mail_mime();
$body = $message->get();
$extraheaders = array("From"=>$sendfrom, "Subject"=>$sendsubject);
$headers = $message->headers($extraheaders);
$mail = Mail::factory("smtp", $params);
$mail->send($recipients, $headers, $body);

// Delete the file from your server


Friday, May 7, 2010

Installing Tomato Firmware on Asus WL520GU

If you're like me having an integrated router and NAS is a big plus. Our needs at my house are somewhat tame, we don't need the fastest NAS nor do we need a full-on Cisco Firewall/Router setup. Also being constrained by US$ (aren't we all) a low cost solution that would allow us to run custom firmware such as dd-wrt and USB storage was what I was looking for.

The WL-520GU was right up our alley and the price was right at less than $40 from Newegg. After getting the unit and trying the stock firmware for less than an hour it was obvious the custom firmware was going to be installed soon. The unit kept locking up on Skype calls and it has issues with the USB drive when rebooted. It could well be user error however we had not noticed that those same behaviors with our Linksys WRT54Gs.

After reading conflicting information on the web and anecodotal testing at the house we were not able to get the USB working for the 520gu using dd-wrt. We did have dd-wrt installed however the USB was not going to work with us, much like a goat not wanting to be milked. Then we stumbled on this article, An Easy Guide to Installing Tomato on the Asus 520gu, and soon the birds were chirping and our USB drive was sharing files like it was born to. We seemed to get the same performance on the storage as indicated in this article, So How Fast Is NAS Under Tomato? You May Be Surprised!. The only changes from the installation article were the following:

1) We used a newer version of the USB hacked Tomato ND firmware which we retrieved from here. Most of the sites seem to link to this post at which has been down for an upgrade for the last two days.

2) We did not reset the router to the default settings when upgrading to the Tomato firmware. This presented the biggest problem of not being able to log into the router with the existing username & password, the default tomato username and password or any of the other 20 or so gyrations that were tried. Eventually doing multiple reset and power cycles allowed us to log in.

The tomato firmware has some nice graphs and other settings that I like more than the dd-wrt firmware and once I get familiar with everything I'm sure there will be some things I miss as well.

Good day and best wishes.

Monday, April 19, 2010

Drupal 6 Shortened URL to Files Directory

We recently had a situation where a client wanted shorter URLs since they were sending out emails and e-newsletters to clients and wanted things shortened up. Since Drupal 6 requires that uploaded files have the entire path it is obvious how that can be an eyesore for some people.

Current URL:
http://{domain}/sites/{domain or alias}/files/{file}.{extension}

A workaround is to go to the file system on the Drupal directory (/usr/share/drupal6) and create a symbolic link to the directory.

user@machine /usr/share/drupal6> ln -s /sites/{domain or alias}/files/{file}.{extension} {short-alias}

user@machine /usr/share/drupal6> ln -s /sites/ mbf

So the new URL becomes:

This Week's Offender - LongTail Video

We will be starting a new installment to help people understand the websites bombarding users with spam. It may not be published every week but we thought the title was catchy. For a little background it is possible to isolate a specific website because we use a service which generates a unique email address for each site we sign up for. We use this service when signing up for e-updates, e-newsletters, accounts, etc.

Website Name:
LongTail Video

Website URL:

Approx Spams per week:

Good day

Friday, January 22, 2010

Internet Speed Test

It is arguable which website offers the best speed test however I recently stumbled across this tidbit.

Hi Jim,

thanks for your fast response!

I like both the Java and the Flash version, however the Flash version offers a nicer gui.

Let me explain our requirements in a bit more detail :-)

As a provider, we want to modify the results ... our customers should see a better speed then they actually have, so they don't start bitching about protocol overhead or whatever. Of course the upper limit is always the customer's contract speed limit. Therefore, the speedtest should be modified in a way that it first gets the customer's up/down limit from our database, then performs the speedtest, then multiplies the results with a factor of, say, 1.2, capped at the customer's up/down limits.

An example: the customer has a dsl line with 2048 down/256 up. speed test returns 1900 down/120 up. 1900 * 1.2 = 2280 > 2048 -> result displayed 2048. 120 * 1.2 = 144 -> result displayed 144

I could enhance the source code with these modifications myself – or you could do it, I don't really care, depends on the price of course :)

Let me know if you're interested,


See the source for a more complete explanation.

So compare the results from the above website's speedtest to something like the popular and see if you notice a difference.