30

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.

odbhut.shei.chhele
  • 5,834
  • 16
  • 69
  • 109

3 Answers3

61

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.

Michael Berry
  • 726
  • 6
  • 7
  • "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). – A. L. Strine Jun 15 '22 at 00:17
18

This is also a good answer that helped me. Thank you @Class

if(extension_loaded('gd')){/*loaded*/}
Yevgeniy Afanasyev
  • 37,872
  • 26
  • 173
  • 191
3

Just type in:

yum info gd

which shows all the details about about gd library installed..

Niyas Niya
  • 155
  • 10