Archive for the 'Internet / Web' Category

How theplanet.com adds a new hard drive to a server

I ordered a new server from theplanet.com (whom I really like, so don’t take this as a dis — I’ve been a customer for over 5 years, and plan to continue with them). So the new server is supposed to have 2 hard drives. Turns out the provisioned it with only one, and then told me, oops, we need to order the hardware. A few hours later (yes, really–I think they must have run out to Fry’s), they said it was in stock, and needed to take the machine down to install it. Fine, I said do it anytime. They actually did start about 30 minutes later (and this was the middle of the night), while I was online. While I was yum-installing packages. Sigh. Here’s from the lastlog (remember these are in reverse order, and some data removed for my protection :)

reboot system boot 2.6.xx Thu Mar 6 03:46 (00:01)
root pts/1 63.xx.xx.xx Thu Mar 6 03:37 - crash (00:09)
root pts/0 63.xx.xx.xx Thu Mar 6 03:29 - crash (00:17)
root pts/0 spyglass.dllstx4 Wed Mar 5 07:26 - 07:26 (00:00)
root pts/0 spyglass.dllstx4 Tue Mar 4 11:55 - 12:02 (00:07)

Hmm, if they could log into it the previous day, it really doesn’t take much longer to just log in and run ’shutdown’, huh? Apparently flipping the power switch is a lot easier. Alright, I can deal. Anyhow, they did install it, so I log in and happen to do ‘history’. Looks like the tech wasn’t too sure of him/herself:

1 fdisk -l
2 exit
3 ls
4 exit
5 fdisk -l
6 reboot
7 fdisk -
8 fdisk -l
9 reboot
10 fdisk -l
11 df
12 mke2fs ext3 /dev/hdb1
13 ls
14 mkdir /Backup_drive
15 mount -t ext3 /hdb /Backup_drive
16 fdisk -
17 fdisk -l
18 reboot
19 fdisk -l
20 mount -t ext3 /dev/hdb0 Backup_drive
21 mount -t ext3 /dev/hdb0 /Backup_drive
22 mount -t ext3 /dev/hdb1 /Backup_drive
23 df
24 reboot
25 fdisk -l
26 ls
27 cd ..
28 ls
29 fdisk -l
30 reboot
31 fdisk -l
32 cd ..
33 ls
34 mount -t ext3 /dev/hdb /Backup_drive
35 mount -t ext3 /dev/hdb1 /Backup_drive
36 fdisk -l
37 history

Wow, that’s a lot of fdisk’ing. And kind of a lot of tries to mount it, considering you just ran fdisk so much. And hey, you didn’t add anything to my fstab or similar… but you did create a silly directory in the root of my other drive. Feh.

Ah well, at least it’s installed and seems to be working fine, and the turnaround was really quite fast to get it done.

WordPress 2 upgrade: smooth as silk

new WordPress logo The new WordPress 2 codebase is supposedly a completely new backend, but my upgrade last night went without a hitch. Impressive. I guess this is largely in part due to my installation being pretty much stock, but even so, nice. I do slightly wonder if I’m missing an index on some of the tables in the DB though, not necessarily from WP2 but even before, my “admin dashboard” has been painfully slow to load. A problem for another day, however.

I’m sort of digging the new TinyMCE wysiwyg editor integration, although I must admit I was also getting pretty used to the Xinha Here! functionality. Not sure I’m totally ready to switch yet, but I’m giving it a try. I love the dhtml sections in the ‘write’ screen, so I can close the ones I don’t usually use, and reorder them to reflect my priorities. Nice work! Also, the new preview mode, while not critical for me and my simplistic theme, is nice to have. I’m definitely liking the better media upload/browse widget, although it’s vaguely unintuitive at first, and I wish it browsed all of the images in my assets folder, not just the newly-uploaded one(s). Also, I’d really like to see you able to put in a URL to an image and have it suck that down… sure there’s potential for copyright infringement, but for stuff like the logo above, I’d rather not deep link to their image, and I doubt they mind me copying it! Maybe an enhancement coming in the future, though.

Overall… so far, so good! Nice work, guys!

Biting the bullet and upgrading to PHP5.1 on prince.org

Due to some other work I’ve been doing in PHP5, and wanting to host on the prince.org server, I finally decided to bite the bullet and upgrade the server’s PHP (for the sites). I had been dreading it, because I knew the eAccelerator wouldn’t work properly with the PHP 5.1 code, and I have my misgivings about APC, (even though we use it in production at Yahoo everywhere) but I desperately need the cache. Plus, the legacy “org” code was written in the PHP4.0 days, so you know there’s going to be issues… like all that wonderful “you really can’t return a reference here… now that’s an error, we used to ignore it (and sometimes segfault)” thing.

I did recompile it though and slam it up, along with building the APC (”pear install apc”, whoo hoo… except for the gotcha in the docs, if you can even find them… it’s an “extension” now not a “zend_extension”). I also built in both the mysql and mysqli stuff (old code uses my own large mysql wrapper class, new code uses ADODB with mysqli underneath for cursors, etc.) All went pretty
smoothly, once I hunted down and killed a rogue line in my php.ini.

I did have a couple places where I had to change the return values of functions to not be references, and now I’m getting a lot more undefined variable warnings (my code sets error_reporting(E_ALL), and apparently it’s stricter now), but basically all went pretty well. And so far, I think I actually like APC better than eAccelerator. I definitely like that some of the Yahoo extensions (for loading constants and storing arbitrary values in the cache) are now exposed. Yay Open Source, yay Yahoo.

So far, so good. Only thing left is to get a weird older version of the Pear class NNTP_Realtime working again (it went missing, after the PEAR install on PHP5, oddly). I need this for some of the Usenet interfacing code. But hey, that shouldn’t be too bad. Way to go PHP5!

The agony of Firefox beta upgrades

Pretty much no extensions have been updatedPretty much no extensions have been updated for the Firefox 1.5 beta 1 release yet. That sux. I feel naked without my favorite extensions! Oh web developer toolbar, where art thou?! Greasmonkey! Sniff, sniff!

I am impressed that the Yahoo toolbar has been updated though! Way to go, guys!

How come? Not at all.

So recently my team built this tool which essentially enables ‘experts’ to blog for Yahoo (unlike 360, there’s editorial workflow, fine-grained access control, etc.). The first folks to launch with it were Health. One of the most popular blogs for them is named “Real and Revealing” (or as I simply call it, “the sex blog”). Recently there was an entry about Female Orgasms. (Insert your own joke about there’s-no-such-thing-as-female-orgasms here.) Anyhow, the best part was one of the comments:

its very hard for me to have an orgasm. the sex would just feel sweet and it makes me want more and sometime dont want to stop. i have never expierence an oral some say it feel damn great to be honest i would like to explore that part of sex but not to return favour. sometime i really think my boyfriend realy suck at making love and he is not very romantic.
Posted by whilybo_2 on Tue, Jun 28, 2005, 10:30 am PDT

Nothing like complaining about your sex life, your boyfriend, and highlighting your lack of willingness to reciprocate all at once… what are you, Republican?

Playing around with DHTML

It’s been a while since I hacked up any DHTML (checking the cvs logs, a year or so since I implemented the ‘orgPop’ feature with xmlhttprequest.) Every once in a while I get the hankerin’ to mess about with client-side stuff, and the past week seems to have be the latest spurt of activity. First it was a Greasemonkey script to more-easily expose info that the work apaches are configured to inject into served pages, now it’s tinkering with prototypes of small bits of functionality for an app my team’s working on. I think I also got a bit inspired by the rollover-news-summary feature on the new Beta of news.yahoo.com, which was a nifty bit of last-minute (as in I think it was 30 mins before the beta went live) engineering by that team (nice!)

So far I’ve hacked up (with little snippets of js code from around the ‘net),

  • a dynamic html table that you can add rows to based on selections in a select box (i.e., pick a new user->adds a row for that user, with columns for their attributes)
  • a pair of html lists (<ul>s) in which you can click on the items, moving them between the two lists
  • a textarea paired with an input box, where text entered in the input box can be autocompleted by any word in the textarea (it’s pretty slick, very gmail-email-address-autocomplete-like)

I’m pretty happy with the results, especially because I haven’t really done anything special to test for IE/Moz, and everything seems to basically work on both. I don’t know if any of these will actually make it into our project, but I hope so. The list-thingy (the second one above), however, isn’t that stellar from a user-interface point of view. I think I’ll end up arguing for paired select boxes with similar behaviors, like Matt Kruse’s Options Transfer example.

One link… since almost all my programming books/references are in storage 2000 miles away, this excerpt from JavaScript: The Definitive Guide (4th ed.) has been awfully useful. I have the 2nd edition in storage, might be time to pick up the newer one.

Double-fisted blogging

I’m trying to figure out where to post entries when I do happen to do so, which is a pretty rare event anyhow. Here, or at 360°? WordPress pretty much kicks 360’s ass at the moment when it comes to editing tools, so I suppose I’ll keep posting the majority here. But, 360 is all Yahoorific, and more at my fingertips while working. I guess I shouldn’t blog from work much anyhow :-)

Well, in the meantime, just a few interesting links… Mac serial number decoder–find out when your Mac was made.
As a guy at work would say, this is totally ringing the bell on the nerdometer. Some guy made Mac OS X Engineer Trading Cards. Yeah… but I have to admit his Ajax-style commenting system rocks. Pretty sweet effect, if a tad useless. Well, I like the submit-without-refresh bit, but the live preview bit is not too useful IMO.
One more: dissecting WordPress themes, seems handy.

Yahoo! 360 going public soon

Yahoo 360°, the social networking product to compete with Friendster and Orkut et al., will be going to public beta shortly. I’ve been playing with it for a while and although it still has some rough edges, it’s definitely getting there. The integration of social networking software with the rest of Yahoo’s network (photos, IM, Y!local, etc.) is pretty powerful. The problem with Friendster and the rest, to me, has always been that I have little reason to visit their sites once the novelty wears off. The tribe.net model seemed interesting, with the craigslist-style recommendation engine hooked in, and 360 has a simplistic version of that as well. But being able to leverage the pre-existing network of all your other friends with @yahoo.com email addresses, and as 360 starts being more deeply integrated into other parts of Yahoo, is the key. It’s totally possible in my mind that Yahoo will succeed here where essentially everyone else, has failed.

Another interesting piece is the prominence of the blog, front and center, in the interface. This could really be the way to get more folks blogging, within a meaningful context–their profile page. The blog-centric features are pretty minimal, especially compared to something like WordPress 1.5, but it’s free, doesn’t require any setup or webspace, and for most folks, easy is more important than feature-laden. And hey, it’s only 1.0 “beta”.

Assuming these things don’t change when the beta goes live… my page

ev1servers.net frustrations

We are hosted at ev1servers.net, and generally I’ve been a really happy customer these past few years. However, we added a 2nd box for mysql, and got their private network (10.) set up between them, and had nothing but problems. Slow connection (typically 6mbit/sec, kind of lame for private network!) and lately, lots of dropped connections/routing problems/loss of connectivity. Bad news. You hate to see mysql queries doing “writing to net” for 5 minutes…! We’ve finally ditched using the private network and are going direct to the external IP on the 2nd box, which is much much faster and more reliable (that’s sad). (Setting this up safely of course involved lots of firewall rules…!) Anyhow, it’s working, but the one thing I’m worried about is that in theory we’re limited to X amount (1T I think) of traffic a month on the frontend interfaces (on both boxes). I don’t want to pay for overages because they can’t manage to get their private networking stuff to work reliably. The nagios graphs of uptime aren’t pretty :-(

Between prince.org and a couple of the other sites we host, we do a decent amount of traffic, and it seems like it’d be a ton easier to just get some rack space and throw some machines at the problem, especially as we’re considering buying (renting) yet another machine… which would really start making the buy vs. rent situation look less viable. One of my big issues is that ev1 is super expensive to get a high-end machine (for example, for a DB server), especially with a lot of RAM. I want a big box to support fulltext searching in mysql, which requires oodles of RAM (the dataset is over 1G), but that is a fortune to rent. I’m going to price (again) local SF hosting providers that are flexible and dig helping out semi-nonprofits like us. And maybe price out an Opteron with 8G of RAM for the database… mmmm that’d be tasty…!

If anyone’s got suggestions about providers (I’m talking about up to 8U and maybe .5T/month transfer, and I’d really like 24/7 access but that’s not a dealkiller if not), let me know!

Comment spam and serious phpbb2 security hole

I’ve been getting a ton of comment spam lately–so, it was time to turn on the “no comments go public until approved” switch. I’ll try to give timely approvals to new comments, sorry for the inconvenience.

There’s a nasty phpbb2 security hole, and one site on my server is running that (one I don’t control directly), and it’s been exploited by at least two different people (judging by IP address) already. You can do some pretty nasty stuff with this hole, to the point where if you have a buggy kernel (one for which there is a local unprivileged user->root exploit), you can get remote root. Blah. Fortunately the script kiddies weren’t that smart, never got past the inital stages. But… worrisome. I always trust my code over other peoples’, even though it’s got a lot fewer eyes on it. I’m just super paranoid about user input processing and handling…

In the meantime (until I figured out exactly what was happening, for sure) I also upgraded PHP to 4.3.9, and mod_ssl to 2.8.22, and Apache to the latest rev. Went pretty seamlessly, but I suspect when I want to do an openssl upgrade it’s going to break everything. Sigh. Too bad no support for RH7.3 anymore! Or, at least, too bad the dedicated box is 1,500 miles away and I can’t just sit at console and upgrade it to something newer…

Next Page »