is imagemagick better than gd? i'm fairly sure my webhosting with dreamhost support imagemagick as i installed phpbb3 ages ago, during the setup, it did say support imagemagick and dg = PASSED.
<?php
print_r(get_loaded_extensions());
?>
Array ( ) 1
wesley could you create a file called test.php with this code:
Code:<?php print_r(get_loaded_extensions()); ?>
and post the results when you navigate to the page
php.net said:exec — Execute an external program
Array ( [0] => libxml [1] => xsl [2] => xmlwriter [3] => dom [4] => xmlreader [5] => xml [6] => tokenizer [7] => session [8] => pcre [9] => SimpleXML [10] => SPL [11] => PDO [12] => SQLite [13] => standard [14] => Reflection [15] => pspell [16] => posix [17] => pdo_sqlite [18] => pdo_mysql [19] => mysqli [20] => mysql [21] => mcrypt [22] => mbstring [23] => json [24] => imap [25] => iconv [26] => hash [27] => gettext [28] => gd [29] => ftp [30] => filter [31] => exif [32] => date [33] => curl [34] => ctype [35] => calendar [36] => zlib [37] => openssl [38] => cgi-fcgi [39] => Zend Optimizer )
looking at what rob posted, i don't think imagemagick is a php extension. he's using exec to run it.
ImageMagick is definitely supported on Dreamhost and is in your path, fyi.
<?php
if ( extension_loaded('imagick') )
{
echo "true";
}
elseif ( extension_loaded('imagick.so') )
{
echo "true1";
}
else
{
echo "false";
}
$ret_val = exec ("which convert");
echo $ret_val;
?>
Wesley could you try this script now:
Code:<?php echo extension_loaded('imagick.so'); echo extension_loaded('imagick'); ?>
Sorry - i edited it - try the one i posted above.
I think i have got it this time.
false/usr/bin/convert
I am trying to find a way of finding whether imagemagick is loaded at runtime. How would i go about this?
<?php
exec("command -v convert &>/dev/null", null, $return);
if ( $return ) {
// Convert exists
}
?>
snip
<?php
$ret_val = exec ("which convert");
echo $ret_val; //returns nothing if there is no imagemagick
?>
<?php
if ( $_POST['password'] )
{
echo "<b>Your MD5 encrypted password is:</b><br /><br />" . md5 ( $_POST['password'] );
}
else
{
echo "<form method=\"post\" action=\"\"><input type=\"text\" name=\"password\" value\"\" /><input type=\"submit\" value=\"encrypt password\" /></form>";
}
?>