Home: Perl Programming Help: Beginner:
Works in one server but not another



florida
Novice

Nov 26, 2002, 8:36 AM


Views: 829
Works in one server but not another

This worked on one server with no problems! It simply gave me a message saying Mail server was down when "sendmail" was not available. Now when I switch the same script to another server it no longer calls this subroutine and wont work. Both servers are Solaris 7. The rest of my subroutines in the script work but not the subroutine listed below. Any suggestions??


Code
use CGI qw(:standard); 
use CGI::Carp qw(fatalsToBrowser);

sub mailFatal
{
print "Content-type: text/html\n\n";
print "<html><head><title>Mail</title></head>\n";
print "<body bgcolor=\"white\">\n";
print "<center><strong><h2><font color=red>Mail Server is not availab
+le
at this time.</font></h2
></strong></center>\n";
print "<br><br><center>Email down</center>";
print "</body></html>\n";
exit;
}

open (MAIL,"|$sendmail") || mailFatal();
#sendmail stuff here
close MAIL || mailFatal();



Fred123
Novice

Nov 26, 2002, 8:44 AM


Views: 827
Re: [florida] Works in one server but not another

See if these are installed properly:

use CGI
use CGI::Carp


That's where I would start.


florida
Novice

Nov 26, 2002, 8:54 AM


Views: 826
Re: [Fred123] Works in one server but not another

On Solaris 7 How would I check to see if "CGI::Carp" was installed properly? Also the CGI part of my script works (such as the "param" function) because my email script does send data and does check for required fields.