WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT ID, COUNT( comment_ID ) AS ccount FROM wp_posts LEFT JOIN wp_comments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE ID IN (110,91,87,86,80) GROUP BY ID

Curioso! » Linux


Archive for the 'Linux' Category

Concatenate image tiles to larger image

Thursday, June 7th, 2007

Often sites display larger images split up in tiles of e.g. 256×256 pixels. The tiles can easily be retrieved using e.g. curl. The full image can be reconstructed using ImageMagick montage:

montage +frame +shadow +label -tile NxM -geometry +0+0 *.jpg joined.jpg

where N is the number of horizontal tiles and M is the number of vertical tiles.

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 110 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '110' AND comment_approved = '1'

No Comments »

NFS

Tuesday, December 12th, 2006

Network File System

Client

Server

  • To map all access to a single uid/gid, put this line in /etc/exports:
    /x/d *(rw,all_squash,anonuid=101,anongid=100)

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 91 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '91' AND comment_approved = '1'

No Comments »

SuSE 10.1 NFS server

Thursday, October 12th, 2006

While setting up my openSUSE 10.1 system, I encountered a lot of “stale NFS handle” problems when accessing my server from a Mac. It appears this is a known bug, Stale NFS handles with kernel 2.6.16.21-0.13 , which requires a online update to the kernel.

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 87 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '87' AND comment_approved = '1'

No Comments »

Flash BIOS on Linux system without floppy

Saturday, September 9th, 2006

My new Linux server will have an AMD Sempron 3000+ CPU, but my MSI RS482M-IL motherboard would not recognize this processor, the BIOS was too old. I did not build in a floppy, so the normal flash procedure does not work. Googling showed up some alternatives of doing this via CD. Free DOS did not work, but the following did:

  • Burn DOS 6.21 on a CD.
  • Burn the BIOS image and flash program on another CD.
  • Boot from the DOS CD and note on which letter the CD drive is mounted, for me it was R:.
  • Type R:
  • Exchange the DOS CD with the BIOS CD.
  • Follow the BIOS flash procedure.

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 86 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '86' AND comment_approved = '1'

No Comments »

Select random picture

Thursday, November 24th, 2005

The following command selects a random picture from the directory for the current year, copies it to the file random.jpg and stores the path in file.txt.

#!/bin/sh
cd $HOME/public_html/images
year=`date +\"%Y\"`
file=`/usr/X11R6/bin/xscreensaver-getimage-file --name $year`
cp $file random.jpg
echo $file > file.txt

It can be used to generate a random background image by e.g. running it as a hourly cron job.

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_post_ID = 80 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 144)]
SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = '80' AND comment_approved = '1'

No Comments »