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


Nov 26, 2002, 8:36 AM

Views: 1067
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??

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
at this time.</font></h2
print "<br><br><center>Email down</center>";
print "</body></html>\n";

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


Nov 26, 2002, 8:44 AM

Views: 1065
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.


Nov 26, 2002, 8:54 AM

Views: 1064
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.