I bought a webhost from hosting provider. But ImageMagick does not work. Hosting provider said ImageMagick is installed.
But ImageMagick still do not work! I think it is not installed properly
So, I need any simple test script to test ImageMagick if it works or not. I need real visual evidence for hosting provider to tell him that Imagimagick is not properly installed. I looked through this site but didn't see any test script.
Please give me any recommendation and testing script(s).
ImagiMagick simple testing script
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImagiMagick simple testing script
First see if one of these works:
<?php
system("/usr/local/bin/convert -version");
?>
<?php
$IM_version=shell_exec("/usr/local/bin/convert -version");
echo $IM_version
?>
<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>
You may have to change the path to wherever your host has IM. Another path might be /user/bin/convert.
<?php
system("/usr/local/bin/convert -version");
?>
<?php
$IM_version=shell_exec("/usr/local/bin/convert -version");
echo $IM_version
?>
<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>
You may have to change the path to wherever your host has IM. Another path might be /user/bin/convert.
Re: ImagiMagick simple testing script
these 3 code gives:fmw42 wrote:First see if one of these works:
<?php
system("/usr/local/bin/convert -version");
?>
<?php
$IM_version=shell_exec("/usr/local/bin/convert -version");
echo $IM_version
?>
<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>
You may have to change the path to wherever your host has IM. Another path might be /user/bin/convert.
1.
Version: ImageMagick 6.5.1-0 2009-04-03 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
2.
Version: ImageMagick 6.5.1-0 2009-04-03 Q16 OpenMP http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
3.
Version: ImageMagick 6.5.1-0 2009-04-03 Q16 OpenMP http://www.imagemagick.org
I KNOW that ImageMagick IS INSTALLED but It do NOT work, I have tested with two my scripts. It do not show image at registration page with image verification.
I need any ImageMagick simple testing script,
Re: ImagiMagick simple testing script
This code will give you the path to ImageMagick:
I can run my code with just convert but depending on the setup you may need to use /usr/local/bin/convert - depending what the code above displays.
A simple script:
Code: Select all
<?php
echo "<pre>";
system("type convert");
echo "</pre>";
?>
A simple script:
Code: Select all
<?php
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("convert input.jpg -thumbnail 50x50 output.jpg");
?>
<img src="output.jpg">
Re: ImagiMagick simple testing script
I did this test, but ImageMagick do not work still.
the bove code gives the path /usr/local/bin/convert
please see here http://www.aba10.com/mmdir/image_magick ... Magick.php
the above code does not convert image input.jpg into output.jpg
please see here
http://www.aba10.com/mmdir/image_magick ... e-test.php
the directory http://www.aba10.com/mmdir/image_magick_test/IM-Forum2/
Code: Select all
<?php
echo "<pre>";
system("type convert");
echo "</pre>";
?>
please see here http://www.aba10.com/mmdir/image_magick ... Magick.php
Code: Select all
<?php
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("convert input.jpg -thumbnail 50x50 output.jpg");
?>
<img src="output.jpg">
please see here
http://www.aba10.com/mmdir/image_magick ... e-test.php
the directory http://www.aba10.com/mmdir/image_magick_test/IM-Forum2/
Re: ImagiMagick simple testing script
You could try this and see if you get any errors, if it still does not work I would contact your hosts.
Code: Select all
<?php
echo "Using convert:<br>";
$array = array();
echo "<pre>";
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("convert input.jpg -thumbnail 50x50 output1.jpg 2>&1", $array);
print_r( $array );
echo"</pre>";
echo "Using /usr/local/bin/convert:<br>";
$array = array();
echo "<pre>";
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("/usr/local/bin/convert input.jpg -thumbnail 50x50 output2.jpg 2>&1", $array);
print_r( $array );
echo"</pre>";
?>
<img src="output1.jpg"><br>
<img src="output2.jpg">
Re: ImagiMagick simple testing script
ImageMagick do not work still, I got error, please see here http://www.aba10.com/mmdir/image_magick ... t-test.php
and directory is here http://www.aba10.com/mmdir/image_magick_test/IM-Forum2/
I am with contact of hosting provider many days about ImageMagick problem. They reinstalled ImageMagick many times, but They cannot managed to settle the problem. They do not know what to do
and directory is here http://www.aba10.com/mmdir/image_magick_test/IM-Forum2/
I am with contact of hosting provider many days about ImageMagick problem. They reinstalled ImageMagick many times, but They cannot managed to settle the problem. They do not know what to do
Re: ImagiMagick simple testing script
Have you CHMOD your dirctory you are saving the image in to 777 or 755 ?