Server Accessible Locally, Not from the Internet

You can learn something everyday it seems.

Yesterday, I had some issues that I hadn’t planned on ever occurring with my local development server. Basically, the issue was discovered when my server suddenly did not have ANY access from the internet. Now, it DID have access to the internet, oddly enough, and I could reach it via hostname through my local network. The first issue I figured it would have been was a router problem. Namely port forwarding was getting messed up. My server is set statically on my network, so the port forwarding should be fine, and Remote Desktop to my XP machine works fine from the outside world. So the router is NOT the issue. Next step was DNS. Maybe my dns is messed up? I checked out my /etc/resolv.conf

> vi /etc/resolv.conf

nameserver ###.###.###.###
I blocked out the ### because this is uneeded information about my ISP. Normally you want your name servers to be a nameserver, or your access to a name server. The first shows my router, from the inner network, which is what can be here. This explains why my hostname works via my network. But it is not the solution to my issue. So I dugg a bit deeper. What was that I said earlier? Ah yes, my server has a STATIC ip. Which means I should have a static route.
> ip route dev eth0 proto kernel scope link src
default via dev eth0 metric 100
OK! There is my issue! My static route is pointing by default to which is NOT my router ( So a quick update to that and that should fix it!
> vi /etc/network/interfaces

This file describes the network interfaces available on your system

and how to activate them. For more information, see interfaces(5).

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto eth0
iface eth0 inet static
I edited the line in bold. This was and now it is
> /etc/init.d/networking restart
Now the networking is reset!
> ip route dev eth0 proto kernel scope link src
default via dev eth0 metric 100
default via dev eth0 metric 100
And Wa-Laa! All done. Now I can access my server via the internet from anywhere as it should be always.

Lesson learned I guess. Hope this helps some others stump issues they are having with static networking on linux.

How To Fix: InnoDB has been disabled for this MySQL server.

I was in the middle of installing program that I have been working on and I encountered a very peculiar error, but I was able to eventually get the answer. Not many people have been able to come to the conclusions that I have come to, so this, I am sure, will help a few out there.

I went to add some InnoDB tables and was returned with the error :

“InnoDB has been disabled for this MySQL server.”

I was running Ubuntu Gutsy with my MySQL installed via apt-get install mysql-server-5.0.

Now, most places on the internet keep telling me that I have to uncomment out the line ‘skip-innodb’ from my /etc/mysql/my.cnf file. This file is also known as my.ini file on some other *nix distributions. I am running mysql 5.0 SO this is ALREADY uncommented.

After 3 apt-get -f –purge remove mysql-server-5.0 and and upgrade to Ubuntu Hardy, I recovered the answer. You see, InnoDB is very touchy. If it isn’t told what is going on , it just doesn’t start. It will usually throw NO error upon this issue. I’m not an expert as to why it does this, but that seems to be the case. I found that there are files in the /var/lib/mysql folder that were getting pointed to in some tutorials on These files were the ibdata1 and the ib_logfile0 files. The program is outputting it’s logs to these files. Now, if InnoDB is supposed to be working, but it’s not, and these files are being pointed at by MyISAM… my understanding is there could be an issue with how the files were created. I did this as root (use sudo in front of each command otherwise)..

>cd /var/lib/mysql
>cp ibdata1 ibdata1.bak
>cp ib_logfile0 ib_logfile.bak
I was just backing them up in case of a misshap. Then I had some fun…
>rm ibdata1 ib_logfile0
After that I ran..
>/etc/init.d/mysql restart
And now my InnoDB options are running. The files have been recreated and it solved and fixed the day :)

First Looks: Yahoo! Search Monkey

So the other day I was invited to try out Yahoo! Search Monkey. If you haven’t heard yet, the Yahoo! Develepors Team is looking to set Yahoo! at the cutting edge of the current level of Internet Develepment. They have realeased a preview (think private beta) testing of SearchMonkey which is the first step to making Yahoo! entirely Web 3.0 (buzzword: sharing social information accross websites, using the internet as a development platform itself).

After loggin in you are given three categories to get started with. Presentation Applications, Custom Data Services, and Data Feeds. The first is pretty much defining what you want th individual to see when they run a search using your application. You can pull from up to 10 URL’s after defining what information you are looking to grab. The second, Custom Data Services, is where you are able to construct your own search engine’ish data path. You can strip data from pages themselves (think wikipedia) or grab from an API (think facebook). The last is mainly used for grabbing from RSS feeds and the like.

More to come as I get developing. I will keep you up to date!

Creating the Ultimate Mobile Developer Computer: Lenovo X61

As a developer, I long for two things that rarely ever come together well. This Christmas, I have been able to do just that, and I love it! I am always on the lookout for something that will give me the power of a desktop, but the mobility and function of a tablet computer. Three years ago I had bought a Toshiba m205, which some may know, was one of the first tablet computers to really make a mark on the market. I really enjoyed it, as it was very nice, but it was quickly outdone by the market. It really couldn’t run Vista, and XP Tablet version has never been developed enough to get the full potential from a tablet computer.

IBM has outdone themselves with the x61. The x61 came out about a half a year ago, and this Christmas they had a one week deal that dropped the price down by nearly 50% of the overall Cost. I jumped at the prospect, even though I had decided to wait another 6 months to replace my aging Toshiba. Let me Introduce you to my new computer.

Lenovo X61

  • Dual Core Centrino Pro 1.8Ghz with 4Mb Cache
  • 3Gb 533Mhz DDRII Ram (Max 4Gb)
  • 100Gb 7200rpm Hard Drive with 1Gb Cache for speed boost
  • Multi-Touch Monitor (Touchscreen and Stylus)
  • Multi-View Monitor (Indoor and Outdoor - full sunlight does not affect viewing enjoyment. ** Max resolution is only 1024 x 768)
  • Tablet Mode (monitor swings around and lays flat)
  • Vista Business
  • Intel 965 Integrated Video with 128Mb dedicated memory
  • 3 usb 2.0, Gigabit Lan, Wifi A/B/G/N, SD reader, PCMCIA slot, 1394 Firewire, VGA out, onboard Mic.
  • 4-Cell Battery (8-Cell available) @ 2.5 hours of power
    So as you can see, this thing flies! It’s a tablet computer that weighs a mere 3.77 lbs with the battery in.

Now to the good stuff, what this is intended to do.

First thing I did was install VMware Workstation 6. This is a virtualization software that will allow me to do what’s next in the list.

Next I downloaded Ubuntu Gutsy 7.10 in live cd Iso format. Then mounted the ISO as a virtual CD drive. Fired up VMware and created a new virtual computer, which was subsequently loaded with Ubuntu.

While in Ubuntu, I then installed Quanta+, Apache, PHP5.2, MySql5, RapidSVN.

Quanta has quickly become my chosen editor when it comes to developing. It’s fast, sublime, pretty and full of features, including auto finishing words you are typing based on a history of the words you have typed. The rest of the LAMP install is too long and also reproduced many times over (check out the forums on for more details if you are interested in this) to repeat here for the 10 Millionth time.

While VMWare is running the Ubuntu machine, that I dedicated 512Mb Ram to, I started network installing Microsoft Office. I really really enjoy using OneNote, which is one of the greatest Tablet Tools that is out there.

After that was all said an done, I know have a mobile computer that packs a serious punch. I am running Vista using OneNote to take notes, Internet Explorer 7, Firefox, Safari and Opera to test web pages, virtualized Ubuntu Gutsy running my editor and Webserver, so no matter where I happen to be, I can easily program and test via a single powerful machine.

Such an amazing combination, I am sure many of you also would consider the same.

How To: Converting PDF to Word and HTML

I started this little project because I have a client whom needs to get his 24 page PDF online. The problem is that a 24 page PDF with all the bells and whistles ends up being over 5mb in size. This causes issues for people running sub-cable internet connections, as the loading time becomes horrendous. So to solve the problem, I am going to run the PDF as a download by choice and have all the links point to the HTML converted page when they click on what page they want to see. This does cause problems if something is updated on the PDF, the HTML is not dynamic or binded to the PDF so an update will have to occur in both places. The only way around that is to have the HTML being the origionating source and have the ‘download as pdf’ link be a call to a server side script that packages the HTML as a PDF. That however is too much for what this client needs and the issues with the updating will have to be taken in stride.

Sites need to be able to interact in one single, universal space.

-Tim Berners-Lee

Read More