Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overrun by errors!! 1

Status
Not open for further replies.

iaresean

Programmer
Mar 24, 2003
570
ZA
Hey there ALL!

I have almost completed my cgi script. It seems to be working 100% and is just going through some final testing. Then I decide to check the httpd error logs. And I was supprised to find about 95000 errors. I deleted them all and then ran my webpage once and then I saw there was only 200 errors. This is still unacceptable, I can't have 200 error messages popping up every time the web page is processed.

I see that about 90% of the error messages are similiar to these:
Code:
[Fri Jan 30 11:23:59 2004] test.cgi: main::omailConfigForm() called too early to check prototype at /home/httpd/cgi-bin/test.cgi line 67.
main::newDomainForm() called too early to check prototype at
        /home/httpd/cgi-bin/test.cgi line 160 (#1)
Here is a snippet of my code around line 67:
Code:
if($menuoption == 20){   #############--MAIN MENU - CONFIGURATION FOR OMAIL ADMIN
        $submit = $query->param('SubmitOmailConfig');
        
        if(!$submit){
                omailConfigForm();
        }
        else{
                $omailconfig = $query->param('omailconfig');
                
                system("cp /etc/vmailmgr/vmailmgrquotas /tmp/vmailmgrquotas_old");
                
                open(DAT,">/etc/vmailmgr/vmailmgrquotas");
                print DAT "$omailconfig";
                close(DAT);
                
                print &quot;$TXT{'update_of_omail_config_successful'}<P>&quot;;
        }
}

All of my sub procedures are defined at the bottom of the page, here is an eg of my omailConfigForm() sub procedure:
Code:
sub omailConfigForm(){
        open(DAT,&quot;/tmp/vmailmgrquotas&quot;);
        @raw_data = <DAT>;
        close(DAT);

print <<EOHTML;
        <CENTER>
        <H3>$TXT{'menu_omail_admin_configuration'}</H3>
        
        <form name=&quot;omailConfiguration_form&quot; method=&quot;post&quot; action=&quot;cadmin.cgi&quot;>
        <TEXTAREA name=&quot;omailconfig&quot; rows=&quot;20&quot; cols=&quot;80&quot;>
EOHTML
        foreach $line(@raw_data){
                print &quot;$line&quot;;
        }

        print <<EOHTML;
        </TEXTAREA><P>
        <input type=&quot;hidden&quot; name=&quot;menuoption&quot; value=&quot;20&quot;>
        <input type=&quot;submit&quot; name=&quot;SubmitOmailConfig&quot; value=&quot;$TXT{'submit_omail_configuration_button'}&quot;>
        </form>
EOHTML
}

Does anybody out there know what these errors mean and how to get rid of them?
Any and all help is greatly appreciated.


Sean.
psa.gif
 
Now I only have a couple of lines of errors, any ideas on how to remove the errors from this piece of code:
Code:
# Get list of account types from file and put them into a select box.
        $count=1;
        
        open(FILE, &quot;cat /etc/hos.conf | grep -e \&quot;^AccountType=\&quot;|&quot;);
        
        while (<FILE>){
                if (/^AccountType=(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+),(.+)$/) {
                        if (($1 ne &quot;parkeddomain&quot;) && ($1 ne &quot;parked&quot;)) {
                                if ($1 eq $accounttypename){
                                        print &quot;<OPTION selected>$1&quot;;
                                }
                                else{
                                        print &quot;<OPTION>$1&quot;;
                                }
                        }
                }
        }
        
        close(FILE);
And here are the errors it is producing:
Code:
[Fri Jan 30 12:07:37 2004] cadmin.cgi: Use of uninitialized value in concatenation (.) at /home/httpd/cgi-bin/cadmin.cgi line 1524.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 1 (#2)
[Fri Jan 30 12:07:37 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 1.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 2 (#2)
[Fri Jan 30 12:07:37 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 2.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 3 (#2)
[Fri Jan 30 12:07:38 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 3.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 4 (#2)
[Fri Jan 30 12:07:38 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 4.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 6 (#2)
[Fri Jan 30 12:07:38 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 6.
Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line
        1549, <FILE> line 7 (#2)
[Fri Jan 30 12:07:38 2004] cadmin.cgi: Use of uninitialized value in string eq at /home/httpd/cgi-bin/cadmin.cgi line 1549, <FILE> line 7.

Thanks once again for any and all help.


Sean.
psa.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top