PDA

View Full Version : detecting if GD libraries are enabled


mangofreak
05-16-2008, 02:51 AM
hi to all,
I am trying to use phpslideshow on a webhost but I'm not having much luck. I was wondering if any of you "geniouses" know how to detect if the GD libraries are enabled. I'm an ASP user so this is not my cup of tea.

Thanks for any ideas.

ranjan
05-16-2008, 05:23 AM
<?php phpinfo(); ?>

Paste the above in a php page and upload it to your host. It would give you all details including gdlibrary

pete
05-16-2008, 08:53 AM
As ranjan said above or create a PHP page with this:


<?php
echo '<pre>';
if(function_exists("gd_info")){
print_r(gd_info());
} else {
echo 'No GD lib';
}
echo '</pre>';
?>

if gd is installed it will display something like this:


Array
(
[GD Version] => bundled (2.0.34 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] => 1
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)
or 'No GD Lib' if it isn't installed.

mangofreak
05-17-2008, 04:27 AM
Thanks Ranjan and Pete. It worked nicely.