previous

hey: I originally said these were going to be weekly, and the schedule's slipped to something more like biweekly. This is mostly due to college-related BS. By mid-March I should be back on track. ~RP

NEWDEV LOG #4

Unpack the nodeball! Frog blast the vent core! Hurry!!

Hello gang. I've been fairly giddy this week. With a lot of help from coder-chief kthejoker and the rest of the edev group, I am now master & commander of a working ECore test suite.

Some day in the far future-- when I become much more attuned to the actual technologies that I am now half-blindly harnessing-- I will write a new edition of katherine's venerable step-by-step guide to installing ECore on a Linux OS. Until then, though, I offer these scattered notes on the process:


#1: 0.8 vs pre-1.0? There are currently two versions of the Everything Web Engine available from everydevel.com: one is version 0.8.3, the other is called "pre-1.0". Which should you choose?

I didn't know the answer myself, so I ended up installing both of them (in separate mySQL databases, of course). ECore 0.8 is the version I'm going to be focusing on in the near-term, though, because all of Everything2's code is based on the 0.8 build.

If you only want to install one, I recommend 0.8.


#2: Get the latest version of everything else. As I mentioned last time, ECore depends upon a stack of other programs in order to function, namely Linux, Apache, MySQL and Perl. Knowing that ECore 0.8 hasn't been actively maintained since 2003(!), I initially made the mistake of trying to install older 2003-era versions of Apache and mod_perl on my state-of-the-art Ubuntu system.

That was a recipe for headaches. As it turns out, ECore will run just fine on modern software, given a minor amount of tweaking. kthejoker tells me that Everything2 itself runs Apache 2.0.55, Perl 5.8.8, and Ubuntu. He didn't mention the MySQL version, but I'm running 5.0.45 on this box and it seems to be working okay.

apt-get install apache2 libapache2-mod-perl2 mysql-server-5.0. That's the good stuff. That is what you want.


#3 - Error 42000. I mentioned "minor tweaking", right? Er, yes. Maybe "moderate to hard" tweaking would be more honest, but I guess it all depends on your comfort level. Personally, I ran into three show-stopping problems during my install process.

The first one is related to MySQL. Specifically, it cropped up during the "make && make install" phase when building the Everything db. When the install script goes to create your initial tables within MySQL, it's going to spit out this error...

ERROR 1067 (42000) at line 46: Invalid default value for 'nodetype_id'
ERROR 1067 (42000) at line 10: Invalid default value for 'node_id'
ERROR 1067 (42000) at line 10: Invalid default value for 'setting_id'

... and a bunch more just like it. Here's what you gotta do:

Open up the folder where you untarred Everything (it's called "ebase" in 0.8), and then go to the "tables" directory. You'll see some text files that end in ".sql" (e.g. nodetype.sql). Those are table definitions. Open one up in a text editor, and look for a line like this...

nodetype_id int(11) DEFAULT '0' NOT NULL auto_increment,

That's your culprit. Apparently, in the newer versions of MySQL a column can no longer have both 'auto_increment' and a DEFAULT value. I don't know enough about SQL to even explain precisely what that means, but suffice to say that DEFAULT '0' and auto_increment are like ex-bandmates. They fucking hate each other now, and will burn your db to the goddamned ground if forced to live in the same column together.

The simple solution is to delete just the "DEFAULT '0'" from each table def whenever you see it in the same line as "auto_increment". Save the files & try again. Your tables should build just fine now.

Though you'll probably have to do it again when you import the ecore nodeball. More on that later.


#4 - Apache2.conf. Here's the next show-stopper: ECore was designed to work with Apache1.3. The by-the-book installation scheme has you making patches to srm.conf & access.conf, and so on. The thing is, Apache2 consolidated all of that configuration business into one big uberfile: /etc/apache2/apache2.conf.

As an Apache novice, I had a hell of a time figuring out how to make my webserver execute index.pl correctly. I wish I could tell you the magic words that finally cracked it, but the truth is: I cheated. I ended up just taking E2's apache2.conf and slapping it into my server, wholesale.

I'd post the whole file here, but (A) it's rather large, and (B) that'd probably be a security risk. But if you're as desperately stuck as I was, /msg me or another coder-god and I'll see if I can help you out.


#5 - Install the ecore nodeball. For some reason, when I setup my 0.8 ECore, the makefile installed the very basic "ebase" nodes but none of the "ecore" nodeball (a "nodeball" is just the Everything term for "a collection of nodes"). Without the ecore nodes, your Everything website will not even display a default page. Instead, it will spit out this rather non-obvious error whenever you call up index.pl...

SOFTWARE ERROR: Can't use string ("") as a HASH ref while "strict refs" in use at /usr/local/share/perl/5.8.8/Everything/HTML.pm line 1550

Fortunately, importing & exporting nodeballs is one of ECore's more effortless features. You can do it using nate's hilariously-named "nbmasta" script, like so...

nbmasta import {nodeball} {dbname}

{nodeball} can refer to the parent directory of an uncompressed nodeball (the "/ebase/nodeballs/ecore" directory, in this case). {dbname} is the name you gave your mySQL database when you ran your Makefile. For example, my particular command looked like this...

mwk@roguepad:~$ ./nbmasta import /home/mwk/ecore/ebase/nodeballs/ecore nodezero02

This (hopefully) will set up the rest of your core system tables and dump them into your db. Remember back in #3, though, where you had to remove some DEFAULT '0's from your table defs? Yeah, you're going to have to do that again, this time in "nodeballs/ecore/tables"


#6 - My favorite part of this whole business? Being able to say the phrase "unpack and import the ecore nodeball" to someone and actually mean it.

Me and Geordi LaForge, yo. This is how we roll.


this is the clean everything.
this is the master everything.
New Everythings are merely a shadow of this...

So, I've got my own Everything now. Two, actually: a pre-1.0 build called "nodezero01" and a 0.8 build called "nodezero02". So cross the first bullet-point off my list. That's pretty exciting in itself.

One of the things I find alluring about this project is that, by attacking the problem head on, it's like you're exploring a world of pure information. Once you get the base system serving pages, virtually everything you need can be accessed from within the nodegel. My basic plan is to rebuild this blank slate into a working copy of E2, one node at a time, deciphering & documenting as I go.

My fresh, trackless database already has 183 nodes in it, and it doesn't hardly do anything at all yet. Figure out the core system and the rest will fall into place. That's what I'm hoping anyway.

~RP

Next time... thumping the Everything Bible on the lectern of PROGRESS, brother.

Log in or registerto write something here or to contact authors.