Christian Geekery

The substance of things hoped for…

Browsing Posts in Sysadmin

Two of my latest projects revolve around WordPress. Both were developed on a staging server, and they needed to be moved to their new homes once development was done.

This is not nearly as hard as one would think… As long as you are comfortable with dumping MySQL databases, editing the dump and restoring it to the new server. Vi as usual was my friend. I had to do global search and replace of the urls and system paths to match the new home.

The rest is even easier. just copy all the wordpress files into there new home, edit the wp-config.php file to reflect the new database/password info. Do some quick sanity tests and I was done. With one exception. I ran into two plugins that lost their settings in the transition. Fixing was as simple as disabling/enabling the plugins to reset to the default settings and customizing as needed. Still looking at the db dump to try and figure out what happened, with little luck so far. I will however prevail, even if I have to ask for help. :-)

I want to mention two items that I have not seen much discussion about with snow leopard.

The first thing I want to mention is that I am pleasantly surprised with how cool my Macbook Pro seems to be running after the upgrade. As I am writing this, my Macbooks overall temp is a mere 113 degrees F. Normally while playing music and all my normal apps are open, I see around 140 degrees F. This is interesting since at the same time everything seems a bit quicker then before.

The second is a gripe, a major one for me at least. The so called Cisco vpn support is only partial. It does not support UDP NAT tunneling. The VPNs that I connect to use UDP. Yes I do have a working Cisco VPN client that now works. But Apple got my hopes up that I would be able to connect to my VPNs without having to run a seperate client, only to be dashed against the rocks of disappointment. I really hope that they get this fixed and put in the next patch.

Overall I am very pleased with this update. I had very little problems with compatibility with my most important applications (with the exception of the cisco vpn client.). The system is faster, and even seems to run cooler.

Today I was tasked with converting an existing Gentoo box into a Samba server. This box will be used to store and share documents, but it did not have enough storage for the task. So instead of just adding another drive, I added two drives with the intention of creating a Software RAID 1 array with the drives. This will help to protect the data from hardware issues, and combined with regular backups they should be fairly well protected from user error.

I chose to go Software rather then a hardware controller due to budget constraints. Since I have not created a Software RAID array before, I figured that I may as well document the process.

continue reading…

When I am tasked with importing data to specific tables on a database, sequences often get messed up. This little piece of SQL will return the correct selects to update the sequence for each table.

select 'select setval(' || regexp_replace(column_default, E'^nextval\((.*)\).*', E'\1') || ', max(' || column_name || ')) from ' || table_schema || '.' || table_name || ';' from information_schema.columns where column_default ~ '^nextval';

As with anybody’s code, sql or otherwise use at your own risk, and only after a backup of the db.


NOLOH is an event-driven object-oriented development platform built on PHP. My own experience has been that I can create web applications with surprisingly little code. Even, Web 2.0 style animations, floating windows, and dynamic content is a breeze.

Asher and Philip developed noloh to create the advantages listed below, and in my opinion, they have succeeded.

continue reading…

For reasons unclear to me, Gentoo merged the “ss” and “com_err” packages into e2fsprogs-libs. Unfortunately portage could not deal with the conflicting packages and people updating are now caught by some blocked packages. Fortunately this is fairly easy to fix as long as you are careful and do the update in a single session.

First you need to make sure that your portage tree and emerge are up to date.
continue reading…

Lets start with a couple of items that we should probably agree on before proceding with my mini rant.

  • Dynamic web sites have become the norm.
  • Databases are often part of a dynamic site.
  • Stored procedures and views are often used for high volume sites.
  • Stored procedures and views should be considured source just like php, python. etc.
  • Any developer worth their salt uses some sort of source control as part of their process. The more complicated the project the more critical source control is, right? A web project that is big enough to need stored procedures is probably fairly complicated, right? So why can’t I find any tools to dump schemas, split them up, and stuff them into something like subversion?!

    Stored procedures can make a dramatic improvement in how much traffic a site can handle. So they will be used more and more by people that want to get the most out of existing hardware. Especially in the light of our current economy.

    Unless I am missing some good tools that already exist, I will be working on my own tools to do this.

    Many people are have been talking about replacing Apache web servers with Nginx. Some of the advantages of Nginx are Faster, Smaller resource usage, and the ability to handle many more connections. From what I have seen so far, all this is true. But not much is mentioned about the surprises along the way. So here are a couple of things that may prepare you.

    continue reading…

    If you need access to any of the ctype functions such as ctype_alnum() in php on gentoo… You will need to add the ctype use flag or you will get this error. This is one of those odd decisions about default configurations that Gentoo has made. Not a huge problem, just inconvenient the first time you run into it.