MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //scripts.20110601.041516.15411/checkgd
#!/usr/bin/perl
                                                                                                                                         
my $hasgd = 0;
                                                                                                                                         
eval {
   require GD;
                                                                                                                                         
   require GD::Graph::pie;
   require GD::Graph::bars;
   require GD::Graph::hbars;
   require GD::Graph::Data;
   my $im = new GD::Image(18,18);
                                                                                                                                         
   my $color = $im->colorAllocate(0,0,0);
                                                                                                                                         
                                                                                                                                         
   my $d = $im->png();

   if ($d ne "") {
	   @KEYS=("1","2");
	   @VALUES=("1","2");
	   my @data = (\@KEYS,\@VALUES);
	   my $my_graph = new GD::Graph::pie( 120, 120 );
	   $my_graph->set(
	      axislabelclr => 'black',
	      '3d' => 0,
	      pie_height => 16,
	      l_margin => 0,
	      r_margin => 0,
	      start_angle => 235,
	      transparent => 1,
	   );
	   $d = $my_graph->plot(\@data)->png;;
	   $hasgd = 1;
   }

   if (-d '/usr/local/cpanel/etc/testimgs') {
       my $testjpeg = GD::Image->newFromJpeg( '/usr/local/cpanel/etc/testimgs/testimg.jpg' , 1 );
       if (! $testjpeg) {
           print "missing jpeg support\n";
           die "GD: Error loading test jpeg";
       }
       my $testgif = GD::Image->newFromGif('/usr/local/cpanel/etc/testimgs/testimg.gif');
       if (! $testgif) {
           print "missing gif support\n";
           die "GD: Error loading test gif";
       }
       my $testpng = GD::Image->newFromPng( '/usr/local/cpanel/etc/testimgs/testimg.png', 1 );
       if (! $testpng) {
           print "missing png support\n";
           die "GD: Error loading test png";
       }
   }

};
                                                                                                                                         
if ($hasgd) {
   print "ok\n";
} else {
   print "missing\n";
}