rondog Posted January 10, 2011 Share Posted January 10, 2011 How do I check in PHP if something like the GD library is installed on a server? I am going to be making a thumbnailing system and the user can install the app on their server. If they have the GD library, continue with making thumbnails, else show a default thumbnail. Quote Link to comment https://forums.phpfreaks.com/topic/223977-checking-if-a-module-is-installed/ Share on other sites More sharing options...
BlueSkyIS Posted January 10, 2011 Share Posted January 10, 2011 One way: if (function_exists('imagecreate')) { // GD is installed } Quote Link to comment https://forums.phpfreaks.com/topic/223977-checking-if-a-module-is-installed/#findComment-1157451 Share on other sites More sharing options...
rondog Posted January 10, 2011 Author Share Posted January 10, 2011 excellent, I think that will suffice Quote Link to comment https://forums.phpfreaks.com/topic/223977-checking-if-a-module-is-installed/#findComment-1157452 Share on other sites More sharing options...
PFMaBiSmAd Posted January 10, 2011 Share Posted January 10, 2011 And if you want to know which gd version and what image types are supported you can use gd_info. Quote Link to comment https://forums.phpfreaks.com/topic/223977-checking-if-a-module-is-installed/#findComment-1157456 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.