This might seem a really stupid question. I am new php image processing. I assume there are only two imageprocessing libraries in php. They are called GD/GD2 and Imagemagick. How do I know which I have installed? or if I have installed any? I have echo-ed phpinfo. It just says that GD imaging was created by Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger. I am really confused. Thanks in advance.
3 Answers
If you can get to the console of the server running PHP, type:
php -i | grep 'GD\|ImageMagick'
This will tell you if GD or ImageMagick is installed and running.
-
"I have echo-ed phpinfo" If GD/ImageMagick appear in the INI, they're installed. All this command does is echo out any lines from the INI that contain those strings (and that's all that is needed). Jun 15 at 0:17
This is also a good answer that helped me. Thank you @Class
if(extension_loaded('gd')){/*loaded*/}
Just type in:
yum info gd
which shows all the details about about gd library installed..
<?php phpinfo(); ?>
Scroll through the list and you will find out all kinds of stuff out about your PHP installation. Including what image libraries it has. If it shows, then it is present.if(extension_loaded('gd')){/*loaded*/}
function_exists()
also