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.
Asked
Active
Viewed 4.1k times
30
-
1if it's listed, then it's installed. – Marc B Aug 27 '14 at 18:57
-
3`` 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. – Crackertastic Aug 27 '14 at 18:57
-
4`if(extension_loaded('gd')){/*loaded*/}` – Class Aug 27 '14 at 18:59
-
I guess it is not loaded then – odbhut.shei.chhele Aug 27 '14 at 19:02
-
You could check if a `function_exists()` also – Aug 27 '14 at 19:11
-
I have checked, i don't have any of them installed :( – odbhut.shei.chhele Aug 27 '14 at 19:12
3 Answers
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