Problem with magickwand installation in linux server

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
vinodkalpaka

Problem with magickwand installation in linux server

Post by vinodkalpaka »

We installed ImageMagick..latest version (ImageMagick 6.3.5-9 and MagickWand 1.0.5) in the linux server and tried to install MagickWandFor PHP but showed Configure Error : You need at least PHP version 5.1.3 to use Imagick.

Current versions in the server:
php: 4.3.11
MagickWand Extension Version : 1.0.4
ImageMagick version : ImageMagick 6.3.5 08/17/07 Q16

Is it necessary to install the version 5.1.3 ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with magickwand installation in linux server

Post by magick »

Try removing that restriction from the config.m4 configuration file and rerun phpize. See if it complains. The original author of MagickWand for PHP put the PHP version restriction in the script but we're not sure why.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Problem with magickwand installation in linux server

Post by mkoppanen »

vinodkalpaka wrote:You need at least PHP version 5.1.3 to use Imagick.
My understanding is that MagickWand does not require PHP5. In Imagick we have this check because zend_std_object_init is not present before 5.1.3. I noticed that this check is still present in MagickWand beta 1.0.6.
Mikko Koppanen
My blog: http://valokuva.org
vinodkalpaka

Re: Problem with magickwand installation in linux server

Post by vinodkalpaka »

which are the lines in config.m4 to remove.

Here are the last lines of the above file which contains infomation regarding php version.

Code: Select all

[i]AC_MSG_CHECKING(if PHP version is at least 5.1.3)

		tmp_version=$PHP_VERSION
		if test -z "$tmp_version"; then
  		if test -z "$PHP_CONFIG"; then
    			AC_MSG_ERROR([php-config not found])
  		fi
   			MAGICKWAND_PHP_VERSION_ORIG=`$PHP_CONFIG --version`;
		else
			MAGICKWAND_PHP_VERSION_ORIG=$tmp_version
		fi

		if test -z $MAGICKWAND_PHP_VERSION_ORIG; then
			AC_MSG_ERROR([failed to detect PHP version, please report])
		fi

		MAGICKWAND_PHP_VERSION_MASK=`echo ${MAGICKWAND_PHP_VERSION_ORIG} | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`

		if test $MAGICKWAND_PHP_VERSION_MASK -ge 5001003; then
				AC_MSG_RESULT(found version $MAGICKWAND_PHP_VERSION_ORIG)
		else
				AC_MSG_ERROR(no. You need at least PHP version 5.1.3 to use Imagick.)
		fi

		AC_DEFINE(HAVE_MAGICKWAND,1,[ ])[/i]
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Problem with magickwand installation in linux server

Post by mkoppanen »

These lines should do it:


AC_MSG_CHECKING(if PHP version is at least 5.1.3)

tmp_version=$PHP_VERSION
if test -z "$tmp_version"; then
if test -z "$PHP_CONFIG"; then
AC_MSG_ERROR([php-config not found])
fi
MAGICKWAND_PHP_VERSION_ORIG=`$PHP_CONFIG --version`;
else
MAGICKWAND_PHP_VERSION_ORIG=$tmp_version
fi

if test -z $MAGICKWAND_PHP_VERSION_ORIG; then
AC_MSG_ERROR([failed to detect PHP version, please report])
fi

MAGICKWAND_PHP_VERSION_MASK=`echo ${MAGICKWAND_PHP_VERSION_ORIG} | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`

if test $MAGICKWAND_PHP_VERSION_MASK -ge 5001003; then
AC_MSG_RESULT(found version $MAGICKWAND_PHP_VERSION_ORIG)
else
AC_MSG_ERROR(no. You need at least PHP version 5.1.3 to use Imagick.)
fi
If that does not help just remove these two lines:

AC_MSG_ERROR([failed to detect PHP version, please report])
AC_MSG_ERROR(no. You need at least PHP version 5.1.3 to use Imagick.)
Mikko Koppanen
My blog: http://valokuva.org
vinodkalpaka

Re: Problem with magickwand installation in linux server

Post by vinodkalpaka »

Thank you all. I have removed the lines related to the php version and now it is working.
Post Reply