- Timestamp:
- 2007-07-09T14:44:19+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/cgi-bin/gliserver.pl
r14235 r14236 264 264 my $installation_status = ""; 265 265 266 print STDOUT "Content-type:text/plain\n\n"; 267 266 268 # Check that Java is installed and accessible 267 269 my $java = $gsdl_cgi->get_java_path(); 268 270 my $java_command = "$java -version 2>&1"; 271 272 # IIS 6: redirecting output from STDERR to STDOUT just doesn't work, so we have to let it go 273 # directly out to the page 274 if ($iis6_mode) 275 { 276 $java_command = "java -version"; 277 } 278 269 279 my $java_output = `$java_command`; 270 280 my $java_status = $?; … … 285 295 286 296 if ($installation_ok) { 287 $gsdl_cgi->generate_ok_message($installation_status . "\nInstallation OK!");297 print STDOUT $installation_status . "\nInstallation OK!"; 288 298 } 289 299 else { 290 $gsdl_cgi->generate_error($installation_status);300 print STDOUT $installation_status; 291 301 } 292 302 } … … 594 604 } 595 605 606 print STDOUT "Content-type:text/plain\n\n"; 607 596 608 my $perl_command = "perl -S $script $perl_args 2>&1"; 609 610 # IIS 6: redirecting output from STDERR to STDOUT just doesn't work, so we have to let it go 611 # directly out to the page 612 if ($iis6_mode) 613 { 614 $perl_command = "perl -S $script $perl_args"; 615 } 616 597 617 my $perl_output = `$perl_command`; 598 618 my $perl_status = $?; … … 601 621 } 602 622 603 print STDOUT "Content-type:text/plain\n\n"; 604 print STDOUT $perl_output; 623 if (defined($perl_output)) 624 { 625 print STDOUT $perl_output; 626 } 605 627 } 606 628 … … 746 768 } 747 769 770 print STDOUT "Content-type:text/plain\n\n"; 771 748 772 my $perl_command = "perl -S $script $perl_args 2>&1"; 773 774 # IIS 6: redirecting output from STDERR to STDOUT just doesn't work, so we have to let it go 775 # directly out to the page 776 if ($iis6_mode) 777 { 778 $perl_command = "perl -S $script $perl_args"; 779 } 780 749 781 if (!open(PIN, "$perl_command |")) { 750 782 $gsdl_cgi->generate_error("Unable to execute command: $perl_command"); 751 783 } 752 784 753 print STDOUT "Content-type:text/plain\n\n";754 785 while (defined (my $perl_output_line = <PIN>)) { 755 786 print STDOUT $perl_output_line;
Note:
See TracChangeset
for help on using the changeset viewer.