MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //scripts.20110531.215904.25158/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";
}