TangoCMS / PHP-XML installation woes

November 17, 2008 – 1:29 pm

I thought I’d give TangoCMS a try this weekend. I have used CodeIgniter and Kohana, and so I figured the TangoCMS which is built on a MVC framework was worth trying. I don’t know if there will ever be as many Zula developers as there are Kohana developers, so that could be an issue. Well, my needs for some projects are minimal, and this might fit the bill regardless.

During some freetime at BarCamp San Diego, I thought I’d try to install TangoCMS 2.1.2 onto my Acer Aspire One. I bought the Linpus version of the Aspire One since I wanted to do some occasional web development on it, I thought it’d be more appropriate than the XP version. As logical as that decision may have been, I ran into some snags getting the CMS up and running.

Apparently the PHP I installed a few months ago with “yum” was missing some XML components. It took a while to figure that out be/c my php_info() showed that I had “–with-xml”, which I assumed was what I needed. That might been true, but something else was awry, or perhaps I made things go awry …

I tried some different yum commands, and then finally thought I’d just remove the PHP instance. I was able to do that just fine, but when I tried to install PHP again, it installed version 5.2.4, which made no sense to me. It installed just fine, but when I checked the php info again, it was still showing 5.2.6, which meant that my apache2 config wasn’t noticing the new install. Grrr …

I didn’t want to muck around with the apache2 config, especially be/c I didn’t want to figure out where the various php installations were hiding. So, I just removed apache2 and reinstalled everything again with the “php-xml” flag. Lo and behold, that did work out, but of course I’m running v5.2.4 instead of the latest v5.2.6. Oh well, at least I can try things out now.

Thankfully, everything works well on my 12″ Powerbook, and I don’t have to mess around with much to do development work. Heh, I can’t say the same for my MacBook Pro after intalling Leopard. I think I have different MySQL instances floating around now.


Barcamp San Diego - learning about improving memory

November 15, 2008 – 2:32 pm

breath deeply - hand on chest and stomach, only the stomach should rise
eating - avoid snacks
sleeping - if you can’t get regular nights sleep, try power napping
before sleeping, review information during the day before going to sleep - done by Da Vinci … sounds like what I learned in psychology class; also try relaxing methods

colors are useful for giving fast clarity … like show all female words in red and all male words in blue
in verb conjugation, you can color code just parts of the word or the change to the base


Barcamp San Diego - Trying Amazon EC2 now

November 15, 2008 – 12:47 pm

I’m trying to start up a Amazon EC2 account right now.

ec2firefox.notlong.com - download elasticfox mozilla plugin.

ec2keys.notlong.com - need to give JS account some keys …

alestic.com - Ubuntu and Debian AMIs for Amazon EC2

Keypairs tab

0.0.0.0/0 Network - Security Groups tab

provide a EC2 user id - eh?

Yah, a bit too complicated and costly for me. $72/month is unnecessary for my meager needs.


Drupal acquia-marina theme woes

October 1, 2008 – 9:38 pm

I’m sure a lot of people have been testing the new Drupal acquia marina theme. I just tried to install it on a 6.4 site, and it’s not working out so well. On a fresh install, it works just fine, but for my existing site, it’s coughing with “Fatal error: Call to undefined function taxonomy_get_vocabularies() /Users/overthis/Sites/icf/sites/all/themes/acquia_marina/template.php on line 339. So, I can only get to the admin section of the site now. All other areas give that error.

By commenting out the whole Taxonomy section of the template.php file, I can navigate to the rest of the site. It’s a quick fix, but it’s definitely not a long term one.

Hmm, turning on the taxonomy module has made the error go away, so I guess it’s a requirement.

The result … http://www.intervarsityicf.org

Although I’m a Mac user, I don’t actively check Safari all the time, but I did notice that my table elements were showing up as rather bold. They look fine in Firefox, and inspecting the css with Firebug didn’t show anything odd. I made the boldness go away by adding a “font-weight: normal” to the td at line 1448 of the style.css file. I guess somewhere it must have picked up a heavier font weight.

Addendum - 11/29/08: It’s been almost two months since installing Acquia, and everything has worked out fine.


My First Drupal 6 Upgrade - Part 1

August 13, 2008 – 5:51 pm

I’m using D6 on a couple sites already, but all of them were created from scratch. Starting from scratch doesn’t require any old content, modules and themes, so it’s a piece of cake.

Converting my work site, which is Drupal 5.9, hasn’t been such a cakewalk. I’m not tearing my hair out in frustration, but it’s definitely a process that requires going slowly. This partial write up will hopefully remind me of what needs to be done when I convert other sites over. The whole notion of skipping D6 is out there, but I think this will be a good exercise.

The first thing I did was tar and gzip the existing site and do a mysqldump on the database. Then I created a new entry in my “/etc/hosts” file, which I named “drupal63″. I also added the usual virtual host stuff to the “/etc/httpd/httpd.conf” file for “drupal63.” I create these new entries for all my development sites, so this was pretty routine. Next, I uncompressed the existing site into the “drupal63″ directory and imported the mysqldump into a new “drupal63″ database. At this point, I had a working backup of the existing Drupal 5 site.

With the “restoration” complete, I proceeded with the “upgrade”. I first renamed the “sites” directory to “sites5″ and “misc” directory to “misc5″ to preserve the directories. Then, I just copied over all the directories from an uncompressed version D6.3. I said OK to the overwriting of all duplicate files/folders, and then moved on. I kept an old version of the “misc” directory be/c there were a few special jquery files there. After I copied them to the new “misc” directory, I deleted the “misc5″ directory.

Next, I moved on to the “sites” directory. I copied the “sites/default/default.settings.php” to a new “sites/default/settings.php” file and edited the “db_url” and “base_url” lines to match my new virtual host and new mysql database. I also had to edit the “$update_free_access” variable to be TRUE since I was going to do the upgrade w/o being logged in first.

Then, I ran the “update.php” script and let it do it’s database updates. With all the updates, there was only one error, but since I don’t know much about why there’s a duplicate key, I’m not going to worry about it now …

Duplicate entry ‘2-0′ for key 1 query: ALTER TABLE term_node ADD PRIMARY KEY (tid, vid) in /Users/me/Sites/drupal63/includes/database.mysql-common.inc on line 374.”

Now, I had a pseudo working Drupal 6 version of the existing site. I had to make the “files” directory writeable at some point to make Drupal happy. The next task was to get my theme to work again. I’ll add that info in Part II. Part III will be about getting my modules to work.


Mollom is playing nicely with my Drupal form

July 28, 2008 – 5:53 pm

I am using Mollom with Drupal, and it is pretty effortless. I’ve used it for the contact form and anonymous forum posting, and I’ve been able to see good results in the Mollom logs. I haven’t had a need to use it with other node types, but from stepping through the code, it looks like it will handle those easily too.

I did have some troubles getting a form that is created and processed through a custom module to work properly though. The code was commented well enough for me to know that I should add a code block for my module’s form to the mollom_protectable_forms() function, which I did with

    if (module_exists('mymodule')) {
      $forms['mymodule_form'] = array(
          ‘name’ => ‘mymodule form’,
          ‘mode’ => MOLLOM_MODE_ANALYSIS);
    }

I wasn’t sure at first if it was supposed to be “mymodule_form” or “mymodule-form”. The function’s comments say, “… add the form ID to the list”, which made me think it was “mymodule-form”. However, the other blocks in the function use the underscore, so I went ahead with that. I assume it makes a difference …

The next thing I did was add my own function to set up the data from my form. I didn’t see anything in the comments saying anything about doing this, and I confess that I didn’t read the API documentation, so this might have been obvious to some developers. For me, I noticed the need for the function when I stepped through the code and saw the function_exists call that was checking for the existence of the “mollom_data_mymodule_form” function. I don’t think there was a hook involved with that, so I created my own function. This made sense be/c there’s no way for Mollom to know which of my form fields contained the text to be analyzed. So, I added

function mollom_data_mymodule_form($form_values) {
  $data = array(
      'post_body' => $form_values['message'],
      ‘author_name’ => $form_values['name'],
      ‘author_mail’ => $form_values['email'],
      ‘author_ip’   => _mollom_ip_address(),
      );

  return $data;
}

With those two edits to the module, everything is working perfectly. Yay!


The iPhone Exchange

July 22, 2008 – 12:29 pm

Apparently, I’m quite the dufus when it comes to setting up my Exchange email account on my iPhone. Well, I don’t blame myself 100% though. I was just duplicating what I type in my account settings in Mail and also the webmail version of Exchange. For those, I would enter my username as “ad/myusername”, and it worked just fine. However, when I tried that on the iPhone this time around, it didn’t work. I am pretty sure that I entered it the same way before I upgraded to v2.0.

The simple solution, as given by someone more knowledgeable in Exchange mail, was to enter my username as “ad\myusername”. When the guy typed in my username, I thought he had entered it wrong be/c I’ve always been allowed to enter it with a forward slash. Boy, did I feel dumb when the back slash was what worked!

Well, at least I can pick up my work email on my iPhone again. Chalk this one up to user error.


iPhone mail is back again.

July 20, 2008 – 11:19 pm

It looks like I wasn’t the only person who was not able to get their Mail. The iphone-dev blog said I needed to do a restore with the custom file I created during the unlock process. I did that, but for some reason I have lost all the prior things, even though the blog said the first sync would bring back all my settings. The only thing that seems to have been restored is my bank of applications I already downloaded. I checked my “Mobile Backups” directory, and it’s empty.

Everything looks like it’s gone. Oh well, that’s life. I will just have to manually readd contacts again. Maybe I should take advantage of my Addressbook …


Pwned iPhone problems with Mail

July 20, 2008 – 12:13 am

I can’t get my Mail anymore!

When I open up Mail, I only see a refresh and write icon at the bottom of the screen; the rest of the screen is blank. At first, I thought it was just taking some time to load my mail after the update, but within a few seconds, the Mail application closes, and I’m back at the icon screen.

What the heck am I supposed to do now??


I Pwned my iPhone!

July 20, 2008 – 12:09 am

The pwnage application was finally released today, and I jumped on it as soon as I could. It took a while to get started since I decided to update my 1G iPhone to version 2.0 first. That took a while, but at least it worked and didn’t complain about anything.

Then, I had to download the ipsw file, which was 214M. With that file downloaded, along with some bootloader files, I was ready to rock. The pwnage application looked nice, but the verbiage was a little confusing to me. It asked, “Are you legit iPhone?” I restored my phone back to normal with iTunes, so I wasn’t sure if I was still “not legit” since I was using t-mobile with all the usual unlocked goodness. After reading someone’s guide, I was able to confirm that legit = at&t activated, which I definitely wasn’t.

Then, it asked if I had been Pwned before. I didn’t have a pineapple as they mentioned, but I was unlocked, so I was also a little unsure about this. I don’t know if iLiberty was similar enough to the original pwnage app, so I wasn’t sure if this would make a difference, but since it said I could click “No” if I was unsure, it didn’t seem like it’d matter a whole lot.

When Pwnage started to do it’s thing, I thought everything was cake. Oh, was I wrong. I got a DFU error, and I couldn’t tell by their picture what I was supposed to do. I did various things, and all those things just sent me back onto the same path. I also got a 1600 error that others also got, but I also got a 1601 error that seemed a little more rare. The worst of it was when my iPhone went black. I couldn’t push any buttons to bring up anything, and so I rebooted my laptop. Then iTunes noticed my iPhone was in restore mode, so I thought I was safe and could just restore and restart. Unfortunately, that wasn’t the case, and I couldn’t even restore to the regular Apple approved version. Yeah, that was scary.

I was probably just trying everything at this point, and I think I must have just gotten lucky and held down the home and power buttons for enough time for the system to totally reboot. Once I saw the familiar screen with the earth and the iPod cable, I knew that I was out of danger. After that, everything started to go smoothly, and I was soooo relieved! Now, I have an unlocked 1G iPhone again with a bunch of new apps! Yahoo!