Archive for the ‘web’ Category

Running the Mosaic Browser on a Modern Linux
March 30, 2012

Yesterday I got inspired by the 18th Anniversary of Philippine Internet and Netscape running on an old computer. I decided to try Mosaic on my Linux box. Mosaic, the predecessor of Netscape and so many other browsers.

Here is how I built it on Ubuntu Precise Pangolin (12.10) beta 64-bit:

  • Downloaded the modernized Mosaic source code. The PNG patch is no longer available.
  • Installed dependencies: sudo apt-get install libmotif-dev libxmu-dev libjpeg-dev libgd2-xpm-dev
  • Manually downloaded and compiled lpng1058.tar.bz2from . Good thing the old PNG libraries compatible with old source are still being maintained.
  • Renamed the definitions ofgetline in ./libnut/url-utils.h ./libnut/url-utils.c ./libwww2/HTInit.c . It is already present in the standard C library.
  • Compiled with make linux.
  • The compile will have warnings about assigning pointers (64-bit) to int. While this is dangerous, it doesn’t stop this Mosaic from running – but it does segfault for some pages. It might be better on a 32-bit machine.
  • The link will fail because the current libpng does not have the deprecated function png_read_init. Instead, copy paste the gcc -o Mosaic line and replace the -lpng with the compiled libpng.a. Also include the system’s libm.a (in my case, /usr/lib/x86_64-linux-gnu/libm.a) since libpng.a is statically compiled. Otherwise, the link will fail with undefined reference to `pow’.

Then, run ./Mosaic. It will have errors like Warning: Cannot convert string “-adobe-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1” to type FontStruct which don’t seem to prevent it from running.

On some sites, I get a core dump. I think it’s because the code was linked against the current libpng.h, but I don’t have time to investigate it. Take a look!

libpng warning: Application was compiled with png.h from libpng-1.0.6 or earlier
libpng warning: Application  is  running with png.c from libpng-1.0.58
libpng error: The png struct allocated by the application for reading is too small.


Yahoo! DNS problems
January 10, 2007

I host a few domains at Yahoo! Small Business. This offers domain registration and zone hosting, plus integration with Y! services which I don’t use. It’s relatively expensive at $9.95 per domain/year, but when I first signed up they had a promo (was it $2?). I also thought it was worth the price for high availability.
Yesterday, I noticed was down when I tried to migrate it. I checked with ‘dig’ and, Yahoo!’s hosting server, was not responding. I checked with the Pingability service: the server is down. It looks like a Yahoo! server failure

Rimuhosting offers DNS hosting bundled with their VPS server. Since I wanted up,  I “unlocked” the domain and pointed the NS records to Rimuhosting.  I set up the A records there.
Today, Yahoo! DNS is back.

I started a Wikipedia and SEO controversy
January 9, 2007

I started a Wikipedia and SEO controversy in December 2005.

I wrote an article about Matt Cutts of Google. I was amused by Philipp Lenssen’s fun interview and cited it as a reference. I posted a comment to let Matt know the article was there. This was the first-ever article I wrote from scratch.
Recently, the article was nominated for deletion. See the reactions there. In defense of Matt’s notability, search veteran Danny Sullivan wrote an open letter to the Wikipedia editors: Yes, Matt Cutts is notable. The discussions there point out some differences between SEO/blogger and Wikipedia culture.

I agree that the editor who recommended the article for deletion should have tagged it for  notability or lack of references. Perhaps I could have fixed this earlier before the debate grew.

What a way to highlight my plans of contributing more to Wikipedia!

Now back on RimuHosting VPS
January 9, 2007

I’m on the RimuHosting MiroVPS2. I have used this Virtual Private Server provider a couple of years ago, then stopped because I didn’t need a high end service (relative to the usual shared hosting), and because I was running out of memory. Since that time, RimuHosting shifted from UserModeLinux to Xen and increased the memory allocation.

I find it a hassle to use FTP and web-based file managers to handle files on CPanel. The GridServer, which I gave up on and cancelled, did allow ssh. This is a “fun” server, just to host blogs and other experiments, so I chose Ubuntu 6.06 Dapper Drake LTS. (My home desktop is on 6.10 Edgy.) RimuHosting does have a RHEL respin option, which I would choose if and when I run a production service.

These are the steps I did to move migrate blog from Media Temple to the RimuHosting VPS:

  • mysqldump’d the WordPress database and scp’d it.
  • scp’d the WordPress files.
  • added the virtual domain to the VPS /etc/apache2/sites-available, and symlinked to ../sites-enabled.
  • started mysqld.
  • used mysql command line to read the dump files.
  • edited wp-config.php to update the MySQL configuration. (now back on localhost – GridServer used a remote shared db)
  • went to the DNS hosting provider’s control panel and pointed the A records to the new IP. Fortunately the DNS TTL they use is short.

And that’s it!

Not so fast. WordPress permalink writing wasn’t working. I thought it was a broken .htaccess, or a broken Apache configuration. It was due to mod_rewrite (and most modules) not enabled by default in Ubuntu.

Media Temple GridServer: I Give Up
January 8, 2007

After suffering through Media Temple GridServer outages, I thought things were normal in the weeks after that. A few days ago, I got a WordPress error saying that it could not connect to MySQL. OK, it happens.

What scares me is when I get MySQL errors inside WordPress.

Media Temple GridServer Bug

I tried connecting through the command line MySQL client. It hangs on this database (, but succeeds on the other one (the one powering this blog) . It looks like serious trouble.

When editing this post, I got a “Lost connection to MySQL server during query.” I’m pretty sure this happens when people update the database, like posting comments.

I signed up for a Virtual Private Server (VPS) which I have used in the past. The down side here is that httpd and mysql might have load problems with the limited memory. I have hit this problem before with VPS solutions. The up side is that I have full control over what’s happening.

I’ll post an update when the new host is running.

Media Temple GridServer Outage
November 20, 2006

So much for their claims and the hype… My GridServer was down – connection refused on this server.
Even the “account center” control panel was down – TCP connection to port 443 timed out. Then, TCP is up but no SSL connection. Port 80 is OK. Server load or switch issue?

Could it be because my account is one month old? I haven’t received an email bill or receipt.

This is really an experimental web hosting system. “The storage system did it.” According to the advisory (which can’t be viewed outside of the Account Center):

Customers on the Grid Server may be experiencing problems with accessing their websites, mail, FTP and their Account Center. Our systems engineers are currently working with Blue Arc to resolve this issue as quickly as possible. Thank you for your patience and understanding.

When I was able to login, I found I had a pending bill in the Account Center but it was not emailed. I’ll pay it now, but I’ll see another month if this is worth $20.