in reply to Re^3: File Upload Size Check
in thread File Upload Size Check

Suppose if I set the file size 1 MB in script and when I am trying to upload the file greater than 1 MB,it is throwing error "Failed to execute CGI "/cgi-bin/Maintenance_Framework.cgi". Contact your administrator." In my view,it should display that "File is too big for upload".

Replies are listed 'Best First'.
Re^5: File Upload Size Check
by marto (Cardinal) on Aug 06, 2019 at 06:11 UTC

    From the documentation I linked to:

    If CGI.pm detects a POST that is greater than the ceiling, it will immediately exit with an error message.

    The code you posted displays an upload too large error on the condition:

    if ( !$filename ) { ....
Re^5: File Upload Size Check
by haukex (Archbishop) on Aug 06, 2019 at 08:53 UTC
    "Failed to execute CGI "/cgi-bin/Maintenance_Framework.cgi". Contact your administrator."

    That sounds like a message from the web server, not from Perl, so you should check your server's error logs for the message that Perl is giving you. See also CGI Help Guide and Troubleshooting Perl CGI scripts.