10 July 2006

MySql error

I guess I must have shutdown a LINUX system before MySQL has stopped as I have a corrupt table. The message I got was:

DBD::mysql::db do failed: Got error 127 from table handler at .......

Issued perror 127
Error code 127: Unknown error 127
127 = Record-file is crashed

It was easy to fix by

  1. cd path to database tables
  2. myisamchk -r dns_ip_2_host.MYI


Next time I will try
mysql dbname
REPAIR TABLE `dns_ip_2_host`

07 July 2006

ImageMagick

Well, I needed a program to convert jpg images to a standard size for a client.

I tried using the perl GD libraries but they were not modern enough to do the job, so I tried ImageMagick.

Used FTP to get the source from ftp://ftp.imagemagick.org/pub/ImageMagick without a problem.

It even extracted without a problem!

Next steps were:

  1. cd ImageMagick-6.2.7

  2. ./configure --with-perl=no --prefix=~/usr/local

  3. make (takes around 10 minutes)

  4. make install (takes around 6 minutes)

  5. PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:~/usr/local/bin

  6. identify -list format

  7. convert philip_test_image.jpg -thumbnail 200x200 -raise 4x4 philip_test_image2.gif