Archive for September, 2013

ImageMagick and PHP 5.4

Friday, September 13th, 2013

When building the PHP imagick module for ImageMagick on a server running PHP 5.4 (a cPanel/WHM box in this case), you receive the following error:

/root/tmp/pear/imagick/imagick_class.c: In function ‘zim_imagick_setfont’:
/root/tmp/pear/imagick/imagick_class.c:1442: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/root/tmp/pear/imagick/imagick_class.c:1442: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c:1442: error: (Each undeclared identifier is reported only once
/root/tmp/pear/imagick/imagick_class.c:1442: error: for each function it appears in.)
/root/tmp/pear/imagick/imagick_class.c:1442: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c: In function ‘zim_imagick_setimageprogressmonitor’:
/root/tmp/pear/imagick/imagick_class.c:9534: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’
/root/tmp/pear/imagick/imagick_class.c:9534: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function)
/root/tmp/pear/imagick/imagick_class.c:9534: error: ‘CHECKUID_NO_ERRORS’ undeclared (first use in this function)
make: *** [imagick_class.lo] Error 1
ERROR: `make’ failed

The solution is to install the beta version of the module instead:

pear config-set preferred_state beta
pecl install imagick

Dell DSET on CentOS

Wednesday, September 11th, 2013

Those of you unfortunate enough to have encountered the Dell technical suport department will know their love for the Dell diagnostic tools. Those of you who run CentOS and have been asked for a DSET report (Dell System E-Support Tool) will also know that the DSET tool refuses to run on an “unsupported” operating system.

Luckily, DSET is quite easy to trick – just add the following to the top of /etc/issue (assuming that you’re running CentOS 6):

Red Hat Enterprise Linux Server release 6 x86_64

Now DSET will work as normal, blissfully unaware that it is running on CentOS and not RHEL. Remember to take the line back out again once you’ve finished with DSET.

Citrix XenServer boot from CD/DVD

Sunday, September 8th, 2013

If you’re using Paravirtualised (PV) guest Virtual Machines on Citrix XenServer, then it’s not immediately obvious how to boot the guest from a CD/DVD should you need to. In the “Boot Options” tab of the Properties for the Virtual Machine, the “Boot Device” drop down menu will be greyed out, with no obvious way of enabling it.

The actual method of booting a Virtual Machine from a CD/DVD is a little less obvious – go to the Virtual Machine in question, switch to the console tab and select the CD/DVD from the drop down list at the top. Make sure that the Virtual Machine is shutdown, then click on the “VM” menu, then “Start/Shut down” and select “Start in Recovery Mode”. The Virtual Machine will now boot from whichever CD/DVD you’ve selected.