WordPress – a solution to “You do not have sufficient permissions to access this page”

Ran into this wonderful WordPress “feature” with MicroKid Related Posts. I would get the error when saving “Related Posts” admin page options. Search hits like this didn’t apply. Browsing results made it seem like this error could’ve been caused by about a thousand different things, including your dog farting too loud.

Problem: plugin directory name “microkid-related-posts.svn”, since I check them out directly and like to know the scm type used

Solution: remove “.svn” from directory name

Should anyone know why that helps, I’d welcome some hints.

Using interactive commands during emerge ebuild phases

Gentoo Portage’s primary tool emerge is largely meant to run as a non-interactive process. Meaning aside from the –ask flag making it get user confirmation before beginning operations, rest of the process is supposed to finish without any further user input.

This mostly makes sense, because compiling software can be a lengthy process. Even more so when you’re possibly emerging tens of packages at a time. It makes no sense for the user to guard the terminal and stare at the Matrix, waiting to answer the occasional, usually trivial Yes/No prompt.

But in this particular use case I have, I’ve discovered I’d like to run an interactive command etc-update after every package finishes installing (ebuild postinst phase). My goal is to have a firm grip on a vserver bootstrap template configuration with the help of git. Portage’s configuration protection litters /etc with ._cfg* files and I would rather not spread the litter to the git repo by just blindly committing everything in postinst. Also, maintaining the bootstrap template is usually a rare and short operation (few packages at a time) where I can monitor the build and act on request.

Your ${ROOT}/etc/portage/bashrc could have something like this:

echo Phase: $EBUILD_PHASE
ETC="${ROOT}etc"
GITCMD="GIT_DIR=$ETC/.git GIT_WORK_TREE=$ETC git"

case "$EBUILD_PHASE" in
    "setup")
        STATUS=$(eval $GITCMD status -uno -s)
        [ -n "${STATUS}" ] && die "Error: $ETC is not clean"
    ;;
    "postinst")
        etc-update
        eval $GITCMD add $ETC
        eval $GITCMD commit -q -a -m \"emerge $CATEGORY/$P\"
    ;;
esac

Problem is that emerge pipes everything to its logfiles and won’t let etc-update get any input from you. Some googling revealed a solution by redirecting stdin and stdout. /dev/tty is magic that always has the right answer, google it yourself for details.

${ROOT}/etc/portage/bashrc:

...
    "postinst")
        etc-update 0</dev/tty 1>/dev/tty
...

Prioritize your Google Reader with +tags

Typical situation with Google Reader: not only does your feed list grow like the Nokia snake in short order, but your tags aka folders list will as well. Sooner or later you will have to limit your time spent in the app because it will be impossible to process everything no matter what you do.

Once you’ve accepted this reality (it will take a certain amount of time :>), it starts to make sense to prioritize tags in the display list. This is useful for quickly glancing over key categories without scrolling through your whole list, which helps keep in-app time spent lower and simultaneously keep the mind at ease. “Phew, I did not miss that massively important blog post, another crisis averted!” type thing.

I have found using the format of “+tag” accomplishes this goal when alphabetic sorting is used and is pleasing to the eye, no doubt thanks to Google recently rewiring my brain according to their plus-sized masterplan.

Note that I have everything sorted alphabetically, because the overhead accompanying manual drag-n-drop sorting probably doesn’t assist with the original goal of spending less time with the app.

Bent Pins

tl;dr Apparently I ran into what is known as “bent pins” issue on my S1156-based Gigabyte GA-P55M-UD2 board the other day.

4GB of RAM started to feel cramped and adding another 4GB 1333MHz DDR3 for 20€ sounded reasonable for a 4x2GB configuration.

So I types

shutdown -h now

off comes Antec Remote Fusion top cover, in go the new memory modules, finger hits Power button.. only to see BIOS showing I still have 4GB of total memory.

Great.

After one or two CMOS resets, power cycles and a bit of BIOS-exploration, I noticed Gigabyte BIOS M.I.T. Status screen show something strange: all memory sticks were listed for 2048MB, but only two of them were shown as being “Enabled”.

OK, foreseeing some more power cycles here, so disconnecting HDD power cables for a bit seemed reasonable. Let the memory slot testing bonanza begin! Couple of interesting behaviors surfaced.

GA-P55M-UD2 has the following memory slot layout:

|-----------------------------------------| DIMM2
|-----------------------------------------| DIMM1

|-----------------------------------------| DIMM4
|-----------------------------------------| DIMM3

Motherboard manual says two-stick Dual Channel is achieved by placing DIMMs into slot 1 and 3. Yet mine were sitting in slots 1 and 2 instead. At that point I seemed to vaguely recall some issues getting slots 1 and 3 to work together and since 1 and 2 Just Worked(tm), I left them there at the time.

But as we need to know whether Slot 3 actually works at all, I set the layout up again. All I got was a pre-POST reboot loop, which was a pretty good indication of some deeper problem. It’s Google-time for “ga-p55m-ud2 8gb memory” and themsuch queries.

Surprise surprise, turns out this behavior has been seen before and one of the first recommended debugging operations seemed to always be “reseat CPU, check for bent pins”. First I had ever heard of this, you (read: I) would think that if a pin was non-functional, you wouldn’t even get to POST. But this box has been rolling along for a few years now, although with memory sticks possibly being in “wrong” non-Dual-Channel slots.

http://www.tomshardware.co.uk/forum/270289-12-another-gigabyte-ud3r-memory-problem
http://www.tomshardware.co.uk/forum/267749-12-windows-usable
http://www.tomshardware.co.uk/forum/270808-12-continuous-short-beeps-p55m
http://www.tomshardware.co.uk/forum/266861-12-p55m-post-reboot-cycle

It was clear now, there was no way to avoid disconnecting the bazillion cables sticking out from the back of the server and digging through desk drawers for that Arctic Silver MX-2 tube. Yawn.

Intel’s instructions for checking sockets:
http://www.intel.com/support/processors/sb/CS-030850.htm

Looking carefully at the socket pin grid, there indeed seemed to be a spot in upper left corner where a pin seemed to reflect light at a different angle being slightly out of the straight line everybody else was standing in. So I augmented it to the best of my ability with the smallest flathead screwdriver I could find in the house (1mm) and using my girl’s reading glasses as magnifying help. While the pin looked somewhat more in line post-op than before, I am still not entirely sure it’s exactly factory-precision.

In the lower right part there seemed to be something that looked like a small part of a fingernail stuck between pins. So for good measures and while I was at it anyway, I patted myself on the shoulder for job obviously well done on the previous CPU installation and dug the unidentified object out of the socket. Was kinda disappointed the cooking heat of the CPU didn’t turn it into a precious jewel of some kind. Would’ve felt nice to get profit out of gcc and kernel compilations.

After some cursing at S1156 HSF mounting mechanism when putting Scythe Shuriken back on top of the CPU, machine was ready to be tested again.

  • #1 Slot 1 and 3 Dual Channel test: machine now booted instead of reboot-loop, PASSED
  • #2 Slot 2 and 4 Dual Channel test: pre-POST reboot-loop, although I’m not entirely sure this is even supposed to work, FAILED
  • #3 Install all four 2GB sticks: BIOS shows 8GB of memory, BIOS M.I.T. Status screen shows all four sticks as enabled, PASSED

So all in all, happy days.

Based on the above, I’d say bent pins inside the CPU socket causing your memory problems is a real good possibility. Definitely check socket, adjust pins and reseat CPU before you convert the motherboard into being a part of your frisbee equipment.

What I’m wondering now is what happens when different pins are out of alignment. Is it always memory issues, or different bad things happen or to what extent the CPU is capable of functioning in general?

WP-to-Twitter test, done with Twitter Tools

So after Twitter Tools is reportedly malfunctioning on a number of sites, including mine, and doesn’t so far support URL shorteners and themsuch, I’m switching to WP-to-Twitter according to this hint.

N950 tip: run ranger, Pythonic vim-inspired file manager

Harmattan has Python 2.6.6, so ranger can run here, as opposed to N900 with Python 2.5.

Find address for latest tgz-ball. Unpack.

$ devel-su
Password: rootme
# cd hut-ranger-<hash>

We can’t execute scripts directly because of aegis, so just run the script into python.

# python ./setup.py install --optimize=1 --record=install_log.txt
# exit

This will install ranger into /usr/local and exit root shell. Now we also can’t run ranger directly because of aegis. Let’s set up an alias for this. Busybox needs $ENV to specify a startup script for it’s built-in ash.

$ vi .profile

Append “export ENV=$HOME/.bashrc” somewhere. Sure, why not “.bashrc”, we’ll be ready as soon as a working bash package gets finally built.

$ echo "alias ranger='python /usr/local/bin/ranger'" > .bashrc

Here’s a screenshot of ranger on N950. Just delicious, surely tastier than mangos.