Verify ImageMagick installation

前端 未结 10 1518
一个人的身影
一个人的身影 2020-11-29 01:16

My web hosting said ImageMagic has been pre-installed on the server. I did a quick search for \"ImageMagick\" in the output of phpinfo() and I found nothing. I can\'t SSH in

10条回答
  •  执念已碎
    2020-11-29 01:46

    Try this one-shot solution that should figure out where ImageMagick is, if you have access to it...

    This found all versions on my Godaddy hosting.

    Upload this file to your server and call it ImageMagick.php or something then run it. You will get all the info you need... hopefully...

    Good luck.

    Test for versions and locations of ImageMagick';
    echo 'Path:  convert
    '; function alist ($array) { //This function prints a text array as an html list. $alist = "
      "; for ($i = 0; $i < sizeof($array); $i++) { $alist .= "
    • $array[$i]"; } $alist .= "
    "; return $alist; } exec("convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
    "; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '
    '; echo 'This should test for ImageMagick version 5.x
    '; echo 'Path: /usr/bin/convert
    '; exec("/usr/bin/convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
    "; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '
    '; echo 'This should test for ImageMagick version 6.x
    '; echo 'Path: /usr/local/bin/convert
    '; exec("/usr/local/bin/convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number. echo "Version return code is $rcode
    "; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version"; ?>

提交回复
热议问题